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

Use a builder object to inquire, validate, and register a custom toolchain #839

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kevherro
Copy link
Contributor

@kevherro kevherro commented Mar 5, 2024

Previously, inquiring and validating a custom toolchain was coupled to registration, which made it difficult to simply look at the custom toolchain independent of registering it.

This change implements ToolchainBuilder, a builder object that finds, validates, and registers a custom toolchain. Each step can be performed independently, with the caveat that registration depends on validation which depends on finding the custom toolchain.

Use cases include:

  • Finding a custom toolchain,
  • Finding and validating a custom toolchain,
  • Finding, validating, and registering a custom toolchain

This change also cleans up some of the platform-specific symlink code by implementing a trait, SymlinkOrFallback, which different platforms can adopt.

This change does not add or remove any existing functionality (except for maybe introducing opportunities for non-Unix-like or Windows platforms to register a custom toolchain).

Discussion at #607

@kevherro
Copy link
Contributor Author

@mitsuhiko any movement here?

@mitsuhiko
Copy link
Collaborator

Will try to get to it next week.

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

Successfully merging this pull request may close these issues.

2 participants