You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a Anchor workspace, using workspace.members in the Anchor.toml does not work.
Adding the following to Anchor.toml:
[workspace]members = ["programs/*",]
results in:
thread 'main' panicked at cli/src/config.rs:314:25:
Error reading workspace.members. File "programs/*" does not exist at path "/test-new/Anchor.toml"
Specifying a single member without wildcard instead works:
[workspace]members = ["programs/test-new/",]
To my understanding from the doc, programs/* should be equivalent to the default behaviour.
This issue prevent to organize several anchor programs in subfolders.
The root cause seems to be the canonicalize_workspace which should probably use a flat_map and expand the wildcard. Happy to draft a PR if this is a potential solution.
The text was updated successfully, but these errors were encountered:
GabrielePicco
changed the title
[workspace.members] not supporting wildcard in Anchor.toml
[workspace.members] not supporting wildcards in Anchor.toml
Jan 23, 2024
The root cause seems to be the canonicalize_workspace which should probably use a flat_map and expand the wildcard. Happy to draft a PR if this is a potential solution.
Yes, we can manually handle the /* case which is the most common case as you suggested. We could also add glob support so that we don't have to manually handle it but I'm fine with both solutions.
Feel free to send a PR for this but I'm closing this issue as it's duplicate of #2658.
In a Anchor workspace, using workspace.members in the Anchor.toml does not work.
Adding the following to Anchor.toml:
results in:
Specifying a single member without wildcard instead works:
To my understanding from the doc,
programs/*
should be equivalent to the default behaviour.This issue prevent to organize several anchor programs in subfolders.
The root cause seems to be the canonicalize_workspace which should probably use a flat_map and expand the wildcard. Happy to draft a PR if this is a potential solution.
The text was updated successfully, but these errors were encountered: