-
Notifications
You must be signed in to change notification settings - Fork 114
Finish apply_dist()
#1730
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
Closed
Closed
Finish apply_dist()
#1730
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 tasks
e3bdcf2 to
1b6e08b
Compare
53eb226 to
d1b13c2
Compare
6a2c7a1 to
41601ce
Compare
fd89162 to
5402a1f
Compare
|
We ultimately elected not to ship the config 1.0 branch. The branch this was meant to be applied to can be found in the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
EDIT (2025-03-13): I was reminded of this PR earlier today, and wanted to leave a quick note for anyone who may try picking up this work in the future.
You can definitely split this up into smaller PRs, I just didn't have the time to do so before my contract ended. You will likely need to mark things with
#[allow(dead_code)]for it to be mergeable.This PR is functional and has unit tests for each part that was split into its own file.
Since I tried to make each file self-contained, you can make PRs doing the following:
pretty_assertionsdep (Cargo.toml,Cargo.lock,cargo-dist/Cargo.toml)cargo-dist/src/init/apply_dist/helpers.rscargo-dist/src/init/apply_dist/artifacts.rscargo-dist/src/init/apply_dist/builds.rscargo-dist/src/init/apply_dist/ci.rscargo-dist/src/init/apply_dist/hosts.rscargo-dist/src/init/apply_dist/installers.rscargo-dist/src/init/apply_dist/publishers.rscargo-dist/src/init/apply_dist/mod.rs+ removecargo-dist/src/init/apply_dist.rscargo-dist/src/init/mod.rs.If you do that, and they all are merged, you can rebase #1763 off
mainand the diff will be way smaller.original description
NOTE: The errors are due to
dist::init::apply_dist::apply()never being called outside of the test suite.This PR is functional and has unit tests for each part that was split into its own file. I knew this PR was going to be distressingly large, so I tried to design it so each part could be treated entirely self-contained.
The exception is
cargo-dist/src/init/apply_dist/mod.rs, which pulls everything else in that directory together.There's also
cargo-dist/src/init/mod.rs, but that's tiny.There is definitely room for refactoring in some spots, because I learned a lot of tricks as I got farther into it. I don't think it's worth adding even more churn to this PR, though.
Detailed list of submodules, which I used to track my progress.
Each of the following submodules under
dist::init::apply_disthandle all configuration values:archives(ArchiveLayer)includeauto_includeswindows_archiveunix_archivepackage_librariessource_tarballextra(deliberately not done)checksumssldotcom_windows_signmacos_signcargo(BoolOr CargoBuildLayer)generic(BoolOr GenericBuildLayer)system_dependencies(SystemDependencies)min_glibc_versionomniborcommon(CommonCiLayer)merge_tasksfail_fastcache_buildsbuild_local_artifactsdispatch_releasesrelease_branchpr_run_modetag_namespaceplan_jobsbuild_local_jobsbuild_global_jobshost_jobspublish_jobspost_announce_jobsgithubcommon(CommonHostLayer)force_latestdisplaydisplay_namegithub(BoolOr GithubHostLayer)axodotdev(BoolOr AxodotdevHostLayer)common(CommonInstallerLayer)install_pathinstall_success_msginstall_librariesbin_aliases(deliberately not done)homebrew(BoolOr HomebrewInstallersLayer)msi(BoolOr MsiInstallerLayer)npm(BoolOr NpmInstallerLayer)powershell(BoolOr PowershellInstallerLayer)shell(BoolOr ShellInstallerLayer)pkg(BoolOr PkgInstallerLayer)identifierinstall_locationupdateralways_use_latest_updatercommon(CommonPublisherLayer)prereleaseshomebrew(BoolOr HomebrewPublisherLayer)npm(BoolOr NpmPublisherLayer)