-
Notifications
You must be signed in to change notification settings - Fork 589
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
Compilation error when using neard crate outside of the workspace #3010
Comments
Should we really pin |
@bowenwang1996 Why do you consider pinning to be unreliable? Alternatively, someone should now spend their time refactoring the usage of ed25519-dalek to resolve the compilation error, and require 1.0.0-pre.4 version. Do you see another solution? |
Hmm, so if I just added a new step which does the build, but deletes Cargo.lock that should be good enough I assume? |
@chefsale yep 👍 |
Added the cargo crate release: https://buildkite.com/nearprotocol/nearcore-private/builds/45#9a65d68b-5a70-4687-812f-dda6d504b587, but it fails as mentioned above, not sure should I disable it for now or not and we should make sure it gets fixed? |
@chefsale can you submit a PR with the proposed fix and confirm that CI gets fixed? Then we just merge it |
Added the PR: #3015 |
Describe the bug
Currently, we rely on Cargo.lock to get reliable builds of nearcore, but when it comes to using nearcore as a crate (library), e.g. in NEAR Indexer, we bump into an issue of that nearcore may fail to compile due to releases of external dependencies since Cargo.lock is ignored for dependencies, and they are only effective on the binary builds.
To Reproduce
The simplest way to reproduce the issue is to remove
Cargo.lock
from the nearcore root folder and try to compile, you will see:The root cause of this is that
ed25519-dalek
crate we use introduced a breaking change between 1.0.0-pre.3 (pinned in our Cargo.lock) and 1.0.0-pre.4 (which gets picked up by cargo since ourcore/crypto/Cargo.toml
allows the newer semver-compatible versions).Expected behavior
The project should be compilable without
Cargo.lock
to enable usage of nearcore as a crate dependency (in NEAR Indexer).Solution
Introduce a CI check that compiles nearcore without Cargo.lock, so we can identify and pin our dependencies reliably.
The fix for this specific compilation error is:
Version (please complete the following information):
The text was updated successfully, but these errors were encountered: