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

Fix [no_std] rust_analyzer error for cargo nexus new #18

Open
danielmarinq opened this issue Nov 30, 2023 · 2 comments
Open

Fix [no_std] rust_analyzer error for cargo nexus new #18

danielmarinq opened this issue Nov 30, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@danielmarinq
Copy link
Contributor

When creating a new Nexus project with cargo nexus new, rust analyzer shows the following error.

Screenshot 2023-11-29 at 7 32 03 PM

It should be fixable as described here: rust-lang/vscode-rust#729 (comment)

@danielmarinq danielmarinq added the bug Something isn't working label Nov 30, 2023
@danielmarinq danielmarinq self-assigned this Nov 30, 2023
@govereau
Copy link
Collaborator

I don't think this is a complete fix for the issue. For instance, say I decide to add a new binary to my project by creating a file in src/bin. If I do this it will break again. Other sites suggest this is a configuration issue with VSCode: it assumes that all targets have a working std, which is not true, and the right way to fix it is to modify the VSCode configuration for the target. Of course, this is work each user has to do.

I can add the extra bits to Cargo.toml, but this is only a partial fix. Alternatively, I may be able to make a "fake" test crate in nexus_rt which will just hide the issue (not sure about this).

How do you think we should proceed?

@danielmarinq
Copy link
Contributor Author

Yeah, I found this too while trying to fix it myself. Perhaps it's better to leave it for now. The fake test might be a good option, but this raises the question of how users will do tests inside their programs. E.g. tests would have to be run on the NVM as well.

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

No branches or pull requests

2 participants