Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Finish apply_dist() #1730

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open

Finish apply_dist() #1730

wants to merge 26 commits into from

Conversation

duckinator
Copy link
Contributor

@duckinator duckinator commented Jan 28, 2025

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_dist handle all configuration values:

  • artifacts
    • archives (ArchiveLayer)
      • include
      • auto_includes
      • windows_archive
      • unix_archive
      • package_libraries
    • source_tarball
    • extra (deliberately not done)
    • checksum
    • tests
  • builds
    • common (CommonBuildLayer; empty struct)
    • ssldotcom_windows_sign
    • macos_sign
    • cargo (BoolOr CargoBuildLayer)
    • generic (BoolOr GenericBuildLayer)
    • system_dependencies (SystemDependencies)
    • min_glibc_version
    • omnibor
    • tests
  • ci
    • common (CommonCiLayer)
      • merge_tasks
      • fail_fast
      • cache_builds
      • build_local_artifacts
      • dispatch_releases
      • release_branch
      • pr_run_mode
      • tag_namespace
      • plan_jobs
      • build_local_jobs
      • build_global_jobs
      • host_jobs
      • publish_jobs
      • post_announce_jobs
    • github
      • common (CommonCiLayer)
      • runners (deliberately not done)
      • permissions (deliberately not done)
      • build_setup
    • tests
  • hosts
    • common (CommonHostLayer)
    • force_latest
    • display
    • display_name
    • github (BoolOr GithubHostLayer)
    • axodotdev (BoolOr AxodotdevHostLayer)
    • tests
  • installers
    • common (CommonInstallerLayer)
      • install_path
      • install_success_msg
      • install_libraries
      • bin_aliases (deliberately not done)
    • homebrew (BoolOr HomebrewInstallersLayer)
      • Bool
      • common
      • tap
      • formula
    • msi (BoolOr MsiInstallerLayer)
      • Bool
      • common
    • npm (BoolOr NpmInstallerLayer)
      • Bool
      • common
      • package
      • scope
    • powershell (BoolOr PowershellInstallerLayer)
      • Bool
      • common
    • shell (BoolOr ShellInstallerLayer)
      • Bool
      • common
    • pkg (BoolOr PkgInstallerLayer)
      • Bool
      • common
      • identifier
      • install_location
    • updater
    • always_use_latest_updater
    • tests
  • publishers
    • common (CommonPublisherLayer)
      • prereleases
    • homebrew (BoolOr HomebrewPublisherLayer)
      • common
    • npm (BoolOr NpmPublisherLayer)
      • common
    • tests

@duckinator duckinator changed the title [WIP] Finish apply_dist() (WIP) Finish apply_dist() Jan 29, 2025
@duckinator duckinator force-pushed the apply-dist branch 4 times, most recently from e3bdcf2 to 1b6e08b Compare February 5, 2025 19:51
@duckinator duckinator force-pushed the apply-dist branch 2 times, most recently from 53eb226 to d1b13c2 Compare February 10, 2025 18:53
@duckinator duckinator marked this pull request as ready for review February 13, 2025 23:05
@duckinator duckinator changed the title (WIP) Finish apply_dist() Finish apply_dist() Feb 14, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant