-
Notifications
You must be signed in to change notification settings - Fork 677
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
Add CI test that checks that attempt publishing crates and compile them to Wasm #4379
Comments
To be able to publish a crate all its dependencies must be versioned. Make sure that this is the case for all packages listed in the `runtime/publish.sh` script. Note that this does not fix the issue completely and there are still other problems stopping the crates from being published. Most notably, some of the dependencies not being published yet. Issue: near#4379
Adding a dry-run publish test won’t work at this stage. Before such
To be honest I’m sceptical that such test will actually be beneficial. |
The `--dry-run` flag will allow to run `runtime/publish.sh` script to test whether all the crates are in a state where they can be published. Note that at the moment, this check fails due to problems described in the GitHub Issue. Issue: near#4379
The `--dry-run` flag will allow to run `runtime/publish.sh` script to test whether all the crates are in a state where they can be published. Note that at the moment, this check fails due to problems described in the GitHub Issue. Issue: near#4379
Oh wow, I didn't realize that assembly script tests work by compiling our vmlogic to wasm to implement mocked blockchain in the javascript environment. That makes sense, but also indeed places a rather big constraint on what we are allowed to do in the relevant parts. Publishing to crates.io and wasm compatability are rather big asks, because the establish a boundary in the code. It's best if this boundary is physically reflected in code layout, rather than it being an informal agreement that "we publish this, this, and this crate, and we don't publish that crate". As such, I think the best long-term solution is to introduce a single umbrella crate for publishing & wasm compat. So, something like That's a long-term solution though, because it requires changing existing consumers of already-published crates. Not sure what's the best near-term solution would be. I suspect it actually might be working towards the long-term solution? I bet the current APIs have already diverged enough to make upgrade of nearcore crates in near-sdk-as non-trivial, so we might as well try to introduce a proper boundary here? |
The `--dry-run` flag will allow to run `runtime/publish.sh` script to test whether all the crates are in a state where they can be published. Note that at the moment, this check fails due to problems described in the GitHub Issue. Issue: #4379
@matklad given what you said, should we close this issue and create a new one on the long term solution? |
I believe we are still in the state of confusion regarding this issue, no decision has been made, and the status-quo is self-contradictory. To reach a decision, we need input from devx team (cc @mikedotexe) on the following questions:
I suggest the following course of action:
Note that I believe that the issue is non-urgent -- there's no active work which is blocked on reaching the decision here. |
I suggest closing the issue (feel free to re-open if you strongly disagree).
It seems like it's less long-term work to setup publishing later, when we either know what exactly do we want to publish, or when we need to publish something ASAP. |
Some of the crates in nearcore are made publishable to crates.io. This is done so that external tools like near-sdk-sim can use them without pulling cross-repo github dependency which frequently break.
Also, some of the crates need to be compilable to Wasm because they are used for test in near-sd-as.
Unfortunately, there are no CI checks that make sure this is correct, and PRs like this one d336b3f#r52341955 can break the above invariants. We need to add the following checks into our CI:
The text was updated successfully, but these errors were encountered: