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

Re-release latest release with vendor code #23

Closed
skeet70 opened this issue Dec 16, 2022 · 7 comments
Closed

Re-release latest release with vendor code #23

skeet70 opened this issue Dec 16, 2022 · 7 comments

Comments

@skeet70
Copy link
Contributor

skeet70 commented Dec 16, 2022

The 0.2.3+4.3.4 release is only 10kb (vs 900kb in the past) and builds have started failing because they're missing vendor files. I think something went wrong in the recent release process that resulted in the vendor submodule not being packaged. It seems like 0.2.3+4.3.4 should be yanked/deprecated and 0.2.4+4.3.4 released with all the required files.

@jean-airoldie

@andrewdavidmackenzie
Copy link

Thanks @skeet70 for this issue. I have given up trying workarounds and will just track this waiting for a fix.

@jean-airoldie
Copy link
Owner

Weird issue, normally cargo builds do a git clone --recursive command.

@jean-airoldie
Copy link
Owner

Very weird since the CI didn't error and the tests ran correctly. Anyway I published a new release which is 911kb and yanked the previous version. Unsure what happened.

jean-airoldie added a commit that referenced this issue Dec 16, 2022
It seems that if a git submodule is not properly initialize on the machine that will publish the crate, cargo won't warn or detect it, as described in this issue rust-lang/cargo#8635. This is hard to detect because the CI is setup to properly `git clone --recursive` and therefore should not detect this issue.

To reduce the likelyhood of #23 from happening again in the future, the `testcrate` was added as a dev-dedependecy to the root crate and the tests were moved to the root crate so that if `cargo test` is ran (even without the --workspace flag), the tests won't compile and the error should be detected.
@jean-airoldie
Copy link
Owner

Alright so it seems that this issue was caused by a weird interaction between cargo and git submodules that wasn't detected (rust-lang/cargo#8635) combined with the fact that the tests didn't link to the testcrate module unless the --workspace flag was provided. I've fixed the later issue, and maybe cargo will fix the former eventually.

Feel free to close the issue if release 0.2.4 fixed your issue.

@skeet70
Copy link
Contributor Author

skeet70 commented Dec 17, 2022

It did solve the issue as I was able to reproduce it. I'll close, if it's still not solved for @andrewdavidmackenzie they can re-open it.

@skeet70 skeet70 closed this as completed Dec 17, 2022
@skeet70
Copy link
Contributor Author

skeet70 commented Dec 17, 2022

Another fix (that I was working on in my fork but bailing on for now) would be to make a GH action do the release on a tag to the repo, so it'd only run after CI (when tagged) and would include the submodule checkout in its checkout action. As long as that action was used for releases, this problem won't happen again.

@jean-airoldie
Copy link
Owner

That would work but the problem is that you have to give your access token to github to publish which is a security liability.

At the end of the day, this is all a byproduct of sub modules being poorly implemented by git. Hardcoding a manual repo clone wouldn't lead to these issues.

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

No branches or pull requests

3 participants