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

✨ Add support for simple wilcard Anchor.toml's workspace.members #2785

Merged
merged 5 commits into from
Jan 25, 2024

Conversation

GabrielePicco
Copy link
Contributor

Add support for simple wilcard Anchor.toml's workspace.members

See #2784 and #2658 for context

Copy link

vercel bot commented Jan 23, 2024

@GabrielePicco is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Collaborator

@acheroncrypto acheroncrypto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this should work but can we get rid of explicit panic!s? I'm aware the previous code also had it but let's not add more of it since this method already returns a Result so that the error can be handled gracefully.

It would also be great to have this for workspace.exclude:

anchor/cli/src/config.rs

Lines 318 to 332 in ef3b149

let exclude = self
.workspace
.exclude
.iter()
.map(|m| {
self.path()
.parent()
.unwrap()
.join(m)
.canonicalize()
.unwrap_or_else(|_| {
panic!("Error reading workspace.exclude. File {:?} does not exist at path {:?}.", m, self.path)
})
})
.collect();

cli/src/config.rs Outdated Show resolved Hide resolved
GabrielePicco and others added 2 commits January 24, 2024 17:24
Co-authored-by: acheron <98934430+acheroncrypto@users.noreply.github.com>
@GabrielePicco
Copy link
Contributor Author

@acheroncrypto I removed the panic!s and refactored the code so that it's also applied to workspace.exclude

Copy link
Collaborator

@acheroncrypto acheroncrypto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

Before we merge, could you note this change in the CHANGELOG?

@GabrielePicco
Copy link
Contributor Author

Sure. Noted in the changelog.

Copy link
Collaborator

@acheroncrypto acheroncrypto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@acheroncrypto acheroncrypto merged commit 169264d into coral-xyz:master Jan 25, 2024
48 of 49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants