Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What output_view.find_all_results() does? #2812

Closed
evandrocoan opened this issue May 3, 2019 · 4 comments
Closed

What output_view.find_all_results() does? #2812

evandrocoan opened this issue May 3, 2019 · 4 comments

Comments

@evandrocoan
Copy link

evandrocoan commented May 3, 2019

Description

It is a undocumented function already listed on:

  1. API Documentation Bugs #2290 API Documentation Bugs

I am here because when my build finishes successfully, this thing is telling me there are 2 errors on my document. I would like to know why it is thinking that because I see no errors whatsoever.
image

The code ran is this:

        ThreadProgress.stop()
        errs = self.output_view.find_all_results()

        if len(errs) == 0:
            sublime.status_message("Build finished")
        else:
            sublime.status_message("Build finished with %d errors" % len(errs))

And the full output of the build panel is this:

Just ensures the directory  is created...

[email protected]'s password: 
Running the command which will actually send the files...

[email protected]'s password: 
sending incremental file list

sent 1,432 bytes  received 18 bytes  2,900.00 bytes/sec
total size is 441,696  speedup is 304.62
Running the command which will actually run make...

[email protected]'s password: 

The current directory is:
/home/linux/LatexBuild
Running the command: make latex debug=
Current time: Thu May  2 23:10:59 -03 2019

declare -a DIRECTORIES_TO_CREATE=([0]="." [1]="./chapters" [2]="./beforetext" [3]="./aftertext")
Creating setup/cache/
Creating setup/cache/chapters
Creating setup/cache/beforetext
Creating setup/cache/aftertext

LATEX_SOURCE_FILES: main.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode

LATEX_PDF_FILES: main.pdf
Took '0:00:00:08.-26' seconds to run the script, 23:11:07.
setup/cache/main.log:10000000 
Coping PDF...

Running the command which will copy back the generated PDF...

[email protected]'s password: 

main.pdf                                        0%    0     0.0KB/s   --:-- ETA
main.pdf                                      100%  457KB  10.7MB/s   00:00    
[Finished in 10.8s]

My project build is this: (I am not using quiet: true)

    "build_systems":
    [
        {
            "name": "Thesis LaTeX [Remote]",
            "shell": true,
            "cmd": ["make", "remote"],
            "env": {"rules": "latex debug=''", "debug": "", "args": ""},

            "target": "exec",
            "syntax": "Packages/Text/Plain text.tmLanguage",
            "working_dir": "$project_path/../monograph/thesis",

            "osx": { "file_regex": "^(...*?):([0-9]+): ([0-9]*)([^\\.]+)"},
            "windows": { "file_regex": "^((?:.:)?[^:\n\r]*):([0-9]+):?([0-9]+)?:? (.*)$" },
            "linux": {  "file_regex": "^(...*?):([0-9]+): ([0-9]*)([^\\.]+)" },

        },
    ]

May be it is thinking there are errors because I have set file_regex and it is matching the setup/cache/main.log:10000000 line?

Environment

  • Operating system and version:
    • Windows 10 build 15063 x64
    • Mac OS ...
    • Linux Mint 19.1 XFCE4 x64
      • Kernel 4.15.0-45-generic #48-Ubuntu SMP Tue ,Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
      • Desktop Environment XFCE4 -> Xfwm4 + Compositing
      • Monitor:
    • Resolution 1920x1080
    • dpi_scale 1.0
    • Sublime Text:
    • Build 3207
    • 64 bit
@OdatNurd
Copy link

OdatNurd commented Jun 7, 2019

May be it is thinking there are errors because I have set file_regex and it is matching the setup/cache/main.log:10000000 line?

That API method does indeed return back a list of all of the matches from file_regex/line_regex. In Default/exec.py in the ExecCommand.finish() method is this code:

        errs = self.output_view.find_all_results()
        if len(errs) == 0:
            sublime.status_message("Build finished")
        else:
            sublime.status_message("Build finished with %d errors" % len(errs))

Specifically the values for file_regex and line_regex are captured for "result navigation" so I suppose technically the status message should prehaps say "results" and not "errors" to be semantically correct.

@FichteFoll
Copy link
Collaborator

So, uhm, what kind of issue is this? Are you only asking about what View.find_all_results does? If yes, then I believe #2290 captures this already.

@evandrocoan
Copy link
Author

It says errors, but there are no errors. The message should be changed, not documented.

@wbond
Copy link
Member

wbond commented Sep 13, 2019

@evandrocoan Paste the output into a buffer and then execute the file_regex for Windows. You'll see two matches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants