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

Some cargo errors are not reported in LF #936

Closed
cmnrd opened this issue Feb 4, 2022 · 0 comments · Fixed by #941
Closed

Some cargo errors are not reported in LF #936

cmnrd opened this issue Feb 4, 2022 · 0 comments · Fixed by #941
Assignees
Labels
bug Something isn't working
Milestone

Comments

@cmnrd
Copy link
Collaborator

cmnrd commented Feb 4, 2022

A simple way to reproduce this:

  1. mkdir -p test/Rust/src-gen/foo
  2. lfc test/Rust/src/Minimal.lf

This prints:

/bin/lfc test/Rust/src/Minimal.lf 
Generating code for: file:/home/cmenard/projects/lingua-franca/test/Rust/src/Minimal.lf
******** mode: STANDALONE
******** source file: /home/cmenard/projects/lingua-franca/test/Rust/src/Minimal.lf
******** generated sources: /home/cmenard/projects/lingua-franca/test/Rust/src-gen/Minimal
--- Current working directory: /home/cmenard/projects/lingua-franca/test/Rust/src-gen/Minimal
--- Executing command: cargo +nightly build --out-dir /home/cmenard/projects/lingua-franca/test/Rust/bin -Z unstable-options --message-format json-diagnostic-rendered-ansi
lfc: error: cargo failed with error code 101
 --> (unknown file):null:1 - cargo failed with error code 101

lfc: fatal error: Aborting due to previous error

I have only tested this with lfc, but I suspect that also the IDE will not show a useful error message here.

The error message reported by cargo in this case is:

error: failed to load manifest for workspace member `/home/cmenard/projects/lingua-franca/test/Rust/src-gen/foo`

Caused by:
  failed to read `/home/cmenard/projects/lingua-franca/test/Rust/src-gen/foo/Cargo.toml`

Caused by:
  No such file or directory (os error 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants