Skip to content

Fix and enhance next/prev message jumping. #207

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

Merged
merged 12 commits into from
Oct 28, 2017

Conversation

ehuss
Copy link

@ehuss ehuss commented Sep 10, 2017

This contains a set of fixes and enhancements for the next/prev message commands:

These changes depend on the changes in #201.

@dten
Copy link

dten commented Sep 11, 2017

i tried this branch cause i wasn't getting F4 etc but for me from commit 7d1ec57 I get these messages and then build says Unable to find target command: cargo_exec

I'm on windows 10 with sublime 3142

reloading plugin Rust Enhanced.cargo_build
Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 109, in reload_plugin
    m = importlib.import_module(modulename)
  File "./python3.3/importlib/__init__.py", line 90, in import_module
  File "<frozen importlib._bootstrap>", line 1584, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 915, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "C:\Users\DavidHewson\AppData\Roaming\Sublime Text 3\Packages\Rust Enhanced\cargo_build.py", line 6, in <module>
    from .rust import (rust_proc, rust_thread, opanel, util, messages,
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 915, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "C:\Users\DavidHewson\AppData\Roaming\Sublime Text 3\Packages\Rust Enhanced\rust\opanel.py", line 6, in <module>
    from . import rust_proc, messages, util
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 915, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "C:\Users\DavidHewson\AppData\Roaming\Sublime Text 3\Packages\Rust Enhanced\rust\messages.py", line 13, in <module>
    from . import util, opanel
ImportError: cannot import name opanel
reloading plugin Rust Enhanced.SyntaxCheckPlugin
Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 109, in reload_plugin
    m = importlib.import_module(modulename)
  File "./python3.3/importlib/__init__.py", line 90, in import_module
  File "<frozen importlib._bootstrap>", line 1584, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 915, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "C:\Users\DavidHewson\AppData\Roaming\Sublime Text 3\Packages\Rust Enhanced\SyntaxCheckPlugin.py", line 4, in <module>
    from .rust import (messages, rust_proc, rust_thread, util, target_detect,
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 915, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "C:\Users\DavidHewson\AppData\Roaming\Sublime Text 3\Packages\Rust Enhanced\rust\messages.py", line 13, in <module>
    from . import util, opanel
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 915, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "C:\Users\DavidHewson\AppData\Roaming\Sublime Text 3\Packages\Rust Enhanced\rust\opanel.py", line 6, in <module>
    from . import rust_proc, messages, util
ImportError: cannot import name messages

@dten
Copy link

dten commented Sep 11, 2017

is it cause messages imports opanel and opanel imports messages?

@dten
Copy link

dten commented Sep 11, 2017

i deferred the imports and it seems to be working now

@ehuss
Copy link
Author

ehuss commented Sep 11, 2017

Thanks for taking a look at it. I guess I never restarted Sublime (and I even tested it on multiple systems). ☹️ And sorry for breaking things, I wasn't considering all the use cases. Please let me know if there are any other issues.

@dten
Copy link

dten commented Sep 11, 2017

Only niggle was it doesn't always show messages for test code

@ehuss
Copy link
Author

ehuss commented Sep 11, 2017

Do you mean error messages for the on-save checking? If so, that is still blocked on rust-lang/cargo#4039.

If it is something else, can you show an example?

@ehuss
Copy link
Author

ehuss commented Sep 23, 2017

I rebased this off master now that #201 has been merged.

@Boscop
Copy link

Boscop commented Oct 26, 2017

Any update on this?
(Jumping to errors before warnings is very important for me..)

@jasonwilliams
Copy link
Member

Should be able to get this into the next release @Boscop

@jasonwilliams jasonwilliams merged commit d76638e into rust-lang:master Oct 28, 2017
urschrei pushed a commit to urschrei/sublime-rust that referenced this pull request Jan 30, 2018
* Sort build messages by level for next/prev shortcuts.

* Add tests for next/prev message order.

* Update for rust 1.22.

* Next/Prev message support when show_errors_inline is False.

Fixes rust-lang#206.

* Add undocumented config variable to disable message sorting.

* Support scrolling the build output panel on next/prev message.

* Fix on-save checking when show_errors_inline is false.

To disable on-save checking, set rust_syntax_checking to false.

* Next/Prev message cycles through test errors.

* Ensure that all views are closed after running tests.

* Fix cyclic import.

* Fix test errors that panic outside of the crate.

Rust display the source file to the outside crate, which probably isn't
available in the current workspace.  Next/Prev message was opening a
non-existent file.

* Fix Next/Prev overriding find-in-files next/prev result.

Fixes rust-lang#209.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants