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

Update message handling for Rust 1.24. #235

Merged
merged 2 commits into from
Jan 27, 2018
Merged

Conversation

ehuss
Copy link

@ehuss ehuss commented Jan 21, 2018

Rust 1.24 introduces some breaking changes, in particular:

  • All paths are now relative to the workspace root instead of the package root.
  • Columns reported in macros are now 1-based (affects test output).

Fixes #234.

@TheIronBorn
Copy link

Could we get some eyes on this? I run into this issue daily.

@jasonwilliams jasonwilliams merged commit 0f06274 into rust-lang:master Jan 27, 2018
@Boscop
Copy link

Boscop commented Jan 27, 2018

Do I just have to restart Sublime to get this fix?

Is there a way to update rust-enhanced without restarting sublime?

@dten
Copy link

dten commented Jan 27, 2018

I think technically you can disable then enable rust enhanced from the package control commands. There's also a check for updates commands if I remember correctly

@Boscop
Copy link

Boscop commented Jan 27, 2018

Ah, i just updated rust sublime but now ctrl-b doesn't do anything anymore. Ctrl shift b still opens the menu but upon choosing one entry it also doesn't build or check etc..
Why?

@Boscop
Copy link

Boscop commented Jan 27, 2018

I also tried disabling and enabling it, didn't work either..

@ehuss
Copy link
Author

ehuss commented Jan 27, 2018

@Boscop Is there anything displayed in the Sublime console?

@TheIronBorn
Copy link

I'm also still getting the issue on v2.7.0. I can still build from the menu or keyboard though. Not seeing any unusual console stuff as far as I can tell.

@ehuss
Copy link
Author

ehuss commented Jan 27, 2018

@TheIronBorn which issue are you having? No messages inside a workspace? Which version of rustc are you using?

@TheIronBorn
Copy link

TheIronBorn commented Jan 27, 2018

Yes, no messages. I just tested with rustc 1.25.0-nightly (0f9c78475 2018-01-17). Testing now with 1.24.0-beta.8 (ed9751a90 2018-01-23)

@ehuss
Copy link
Author

ehuss commented Jan 27, 2018

@TheIronBorn I think you need 2018-01-19 or newer.

@TheIronBorn
Copy link

Ah. It works for 1.24 at least

@TheIronBorn
Copy link

Confirm it works for rustc 1.25.0-nightly (bacb5c58d 2018-01-26)

@Boscop
Copy link

Boscop commented Jan 28, 2018

@ehuss When I press Ctrl-B, in the console it shows this:

2018-01-28 05:25:48,180: 8104: DEBUG: on_window_command
2018-01-28 05:25:48,193: 8104: DEBUG: Looking for client for extension rs in D:\docs\foo\foo-server
2018-01-28 05:25:48,194: 8104: DEBUG: Extension rs is not supported yet
Exception in thread Cargo Exec:
Traceback (most recent call last):
  File "./python3.3/threading.py", line 901, in _bootstrap_inner
  File "./python3.3/threading.py", line 858, in run
  File "rust.rust_thread in C:\Users\me\AppData\Roaming\Sublime Text 3\Installed Packages\Rust Enhanced.sublime-package", line 91, in _thread_run
  File "cargo_build in C:\Users\me\AppData\Roaming\Sublime Text 3\Installed Packages\Rust Enhanced.sublime-package", line 195, in run
  File "rust.cargo_settings in C:\Users\me\AppData\Roaming\Sublime Text 3\Installed Packages\Rust Enhanced.sublime-package", line 373, in get_command
AttributeError: 'str' object has no attribute 'get'

@ehuss
Copy link
Author

ehuss commented Jan 28, 2018

@Boscop Did you restart Sublime? I think the automatic package updater doesn't always reload the package properly.

@Boscop
Copy link

Boscop commented Jan 28, 2018

@ehuss Now after I restarted Sublime Ctrl-B works again, but the original problem is not fixed, it still interprets the path wrong. rustc 1.25.0-nightly (da569fa9d 2018-01-16)

@ehuss
Copy link
Author

ehuss commented Jan 28, 2018

it still interprets the path wrong. rustc 1.25.0-nightly (da569fa9d 2018-01-16)

@Boscop look up a few comments, you need 2018-01-19 or newer.

@Boscop
Copy link

Boscop commented Jan 28, 2018

Ah thanks, it works now :)

@jasonwilliams
Copy link
Member

Do i need to update the readme with which version of Rust we're supporting now?

@ehuss
Copy link
Author

ehuss commented Jan 28, 2018

Do i need to update the readme with which version of Rust we're supporting now?

@Jayflux it's up to you, but I don't think it's important. I try to ensure that things work with reasonably old versions of Rust (at least back to 1.15, check requires 1.16). Specifying which nightly works is an endless game, since it will break occasionally. I've thought about setting up CI to catch breaking changes faster, but I think there would be a high risk of false errors (the tests are not as robust as I'd like, and it would be at the mercy of spurious nightly rust problems).

@jasonwilliams
Copy link
Member

jasonwilliams commented Jan 28, 2018

@ehuss i do think CI would be a great thing, The sublime team are working on exporting their syntax checker as a separate executable so we could run syntax tests on CI, it should be available in their next release, here's an example of them using it here:
https://github.com/sublimehq/Packages/blob/master/.travis.yml

@ehuss
Copy link
Author

ehuss commented Jan 28, 2018

@Jayflux The test framework I use (https://github.com/sublimetext/unittesting) actually supports running a full Sublime installation on CI and executing all the tests. I'll take a look at getting it started sometime soon.

urschrei pushed a commit to urschrei/sublime-rust that referenced this pull request Jan 30, 2018
* Remove Cargo.lock files in tests, not needed.

* Update message handling for Rust 1.24.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants