-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
No errors reported when custom build command failed #3155
Comments
Could you share the output of |
|
The error seems to end up on |
Triage: still happens. |
8355: internal: do not drop errors from cargo metadata/check r=matklad a=matklad Work towards #3155 Co-authored-by: Aleksey Kladov <[email protected]>
8355: internal: do not drop errors from cargo metadata/check r=matklad a=matklad Work towards #3155 Co-authored-by: Aleksey Kladov <[email protected]>
Thanks for marking this as a broken window @lnicola ! |
I am getting the following when opening a source file with intentionally introduced error (commented out
I do not seem to be able to pass Not sure if that is relevant, but I am using NeoVim (see below) with CoC plugin (
Am I missing something, is there something more than just simple commented-out Btw, thanks for adding the error log there - I am not sure what would have been the behaviour without it, but it would probably be much more difficult to figure out where it fails without this recently added log message. 👍 |
It’s a misleading error message/missing feature in cargo. We should only
emit this error if a build script or proc macro compilation failed, bit at
the moment we emit an error if the whole compilation failed. We should port
RUSTC_WRAPPER hack from IntelliJ for that.
…On Monday, 12 April 2021, mareq ***@***.***> wrote:
I am getting the following when opening a source file with intentionally
introduced error (commented out use, so that there is undefined symbol):
[Error - 01:09:16] Request textDocument/codeLens failed.
Message: content modified
Code: -32801
[ERROR rust_analyzer::reload] failed to switch build data: cargo check failed:
Checking data-analytics-backend v0.1.0 (/home/mareq/work/projects/sandbox/data-analytics/backend)
error: could not compile `data-analytics-backend`
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
[ERROR rust_analyzer::reload] failed to switch build data: cargo check failed:
Checking data-analytics-backend v0.1.0 (/home/mareq/work/projects/sandbox/data-analytics/backend)
error: could not compile `data-analytics-backend`
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
[ERROR rust_analyzer::reload] failed to switch build data: cargo check failed:
Checking data-analytics-backend v0.1.0 (/home/mareq/work/projects/sandbox/data-analytics/backend)
error: could not compile `data-analytics-backend`
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
I do not seem to be able to pass --verbose as the message suggests, but
it looks like it is coming from here
<de33702#diff-cea12fd06df2685d067ced366e73bb98f646f9d0801f06a40b507a0e149dd442R235>
.
Not sure if that is relevant, but I am using NeoVim (see below) with CoC
plugin (d3e40cea
<neoclide/coc.nvim@d3e40ce>
).
NVIM v0.5.0-dev+1236-g1b030f889
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Am I missing something, is there something more than just simple
commented-out use statement, or is it just uninformative message? I
*think* I have seen similar thing on different toy-project two days ago,
which was provoked by building it from command line and then having
rust-analyzer to have its go (cargo clean did reliably "resolve" that
problem) - unfortunately I do not have that toy-project any more, but if
needed, I may be able to re-create it.
Btw, thanks for adding the error log there - I am not sure what would have
been the behaviour without it, but it would probably be much more difficult
to figure out where it fails without this recently added log message. 👍
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3155 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANB3M2IRAP6E5OQ5DYNF5DTII463ANCNFSM4KVZYDJA>
.
|
@matklad Thanks, that starts to make sense then. Do you thing that it would be possible to somehow prevent this problem? (That is my primary motivation behind asking the above question.) |
Nice, thank you Mr.! 👍 EDIT: I have compiled |
Thanks for verifying that it works and reporting back @mareq ! |
When opening in VSCode, it doesn't show any error however.
(By the way the error was because I didn't run
git submodule update --init
)The text was updated successfully, but these errors were encountered: