Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

Still getting 'can't find crate` error #579

Open
echupriyanov opened this issue Apr 18, 2019 · 2 comments
Open

Still getting 'can't find crate` error #579

echupriyanov opened this issue Apr 18, 2019 · 2 comments

Comments

@echupriyanov
Copy link

echupriyanov commented Apr 18, 2019

Hi! I'm working on the Stegos project https://github.com/stegos/stegos

VS Code with Rust plugin makes an excellent IDE for Rust development, but in Stegos project I'm getting can't find crate for 'stegos_consenus' in the node/src/lib.rs file.

I've tried different settings for rust.build_bin and/or rust.build_lib, but without any success.

Here is my settings.json:

{
    "files.autoSave": "onFocusChange",
    "editor.fontFamily": "'Fira Code',Menlo, Monaco, 'Courier New', monospaceze",
    "editor.fontLigatures": true,
    "breadcrumbs.enabled": true,
    "editor.tabSize": 4,
    "editor.detectIndentation": true,
    "explorer.confirmDragAndDrop": false,
    "[markdown]": {
        "editor.insertSpaces": true,
        "editor.tabSize": 4,
        "editor.autoIndent": false,
    },
    "git.autofetch": true,
    "editor.formatOnSave": true,
    "editor.formatOnPaste": true,
    "window.zoomLevel": -1,
    "gitlens.views.repositories.files.layout": "tree",
    "terminal.integrated.shell.osx": "/usr/local/bin/bash",
    "git.confirmSync": false,
    "zentabs.maximumOpenedTabs": 5,
    "rust-client.updateOnStartup": true,
    "rust.build_lib": true,
    "rust.build_bin": "stegos",
    "rust-client.logToFile": true
}

Is there a way to fix this issue?

@echupriyanov
Copy link
Author

Any ideas or directions, please?

@marmistrz
Copy link

marmistrz commented May 27, 2019

Today I have encountered the can't find crate issue again. It didn't occur to me since #442 had been closed.

How to reproduce: clone the repository https://github.com/golemfactory/golem-unlimited. Make sure you're on the release/0.2 branch. Launch VS Code and compile the project.


For reference, this is the precise commit that triggers the errors: https://github.com/golemfactory/golem-unlimited/commit/6fbb3070c12fe3e8417b92922344b67e41484a83

I have tried on those rust versions:

beta-x86_64-unknown-linux-gnu unchanged - rustc 1.36.0-beta.1 (3a5d62bd5 2019-05-22)
nightly-x86_64-unknown-linux-gnu update failed - rustc 1.36.0-nightly (6afcb5628 2019-05-19)


The issue *doesn't* happen if I bypass rustup and use RLS from the `rust` Arch Linux package, or if I'm using the stable toolchain:
   stable-x86_64-unknown-linux-gnu unchanged - rustc 1.35.0 (3c235d560 2019-05-20)

As a result, I guess it's not related to the VSCode plugin, but to RLS itself.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants