-
Notifications
You must be signed in to change notification settings - Fork 105
Cannot get error to actually display in-code #174
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
Comments
The inline error reporting currently only works when you save a file (it triggers a partial compile in the background). What you are showing is the Build system output. There is work in progress (see #165) to enhance the build system to also show inline errors. If you are not seeing inline errors when you save the file, is there any output in the Sublime console? |
Saving a file does nothing. Or at least, the output doesn't end up on the screen, I don't know how I could check if the recompile is actually triggered. Only using CTRL+B to build the project works. There is output on the lower half of the screen: That is all I have been working with. I do not have a sublime-project file if that matters (saw it in #165 ). |
The Sublime console can be opened with Ctrl+` (backtick). There might be some diagnostic information there. |
Ah! There is output when I save the file:
This is what I get when I save the file. However, there is nothing ending up on the screen.... Wait, I just noticed: I do actually get the error messages - if the console is opened! This is very strange. Apparently, the plugin does not work by default, it requires that you at least once open the Sublime Text console and save a file. THEN and only then you will get the actual error messages on a save. If you are like me and just install the plugin, it doesn't work. To make it work, you have to open the console and (while the console is open), save the file. This will actually "activate" the plugin. The change is persistent, it still works after a restart of Sublime Text, even without having the console open. I'll restart my computer, see if it changes anything. The plugin works now as expected, but I hope this is persistent. |
Alright, it seems that it is persistent between restarts of Sublime Text, but once I restart my computer, it's back where it was at the beginning. Now it gets funky: When I save now, the errors actually appear for a very short period of time (a few milliseconds), flicker / flash a few times, then disappear after about a second. Again, the error is fixed by opening the console and saving the file while the console is opened. The errors will display correctly - until I restart the computer. |
When it says something like this:
That just means that rust found an error, but that file is currently not open, so it will not display any messages for that file. I can't imagine why opening the Sublime console would make any difference in the behavior. As for the flickering, I suspect the issue is that building/checking your package is relatively slow. It should display the text |
Your syntax is set to Rust not Rust Enhanced. I suggest disabling the default Rust package so only one is thinking about errors. It could be one is wrong out the others messages. also what version of rust are you using? |
Thanks for the replies.
I didn't know that the plugin added a special syntax, that isn't enabled by default. The main README says nothing about it (only tells you to install the plugin, but not to change the syntax afterwards). Thanks for the hint. Changing the syntax at least formats the errors more nicely, not sure if it changed anything about the error handling. My rustc version is: The thing is, the For the most part it is working now, but it didn't work for over a week (where I constantly saved files, of course). I claim that the Well. If nobody can replicate this issue and other people don't have this problem, then maybe something is wrong with my setup. It works now, so I am closing this issue. |
Sublime Text Version
Sublime Text 3 (Build 3126)
Rust Enhanced Version
1.3.0
Operating system
x86_64 GNU/Linux
4.4.0-66-generic
Expected behavior
The errors should show up where I have them, like in the screenshot in the main README.
Actual behavior
This:
The errors get displayed, but in the bottom half of the screen. So to actually get to an error, I have to use the lower console window, scroll it to the top (because it always scrolls to the bottom) to get the first error, then see where the error is, then go to that location in the code (if I use something like Goto Anything, the lower console window will disappear, I have to recompile to get the list of errors back).
What is going on? Is this supposed to be this way and if yes, how is this user friendly? I want the error messages to display in the red box, not the line number. The line number tells me nothing. Clicking on the red box doesn't do anything.
Steps to reproduce
The text was updated successfully, but these errors were encountered: