Skip to content

Conversation

StephaneMagne
Copy link
Contributor

In the .yaml file we currently support the project name:

project_name: Sample

Now the weaver annotations will support the field projects to be able to limit which project the dependency is associated with.

The annotation will look like this:

// weaver: logger = Logger
// weaver: logger.projects = [Sample]

or this:

@Weaver(.registration, projects: ["Sample"])
private var logger: Logger

Since this is a String based field without autocomplete, typos may occur. To support this, I've added in build time logging (which is only printed out If the projects attribute is used):

Project Names...
Active: Sample
Found:  Sample, TestApp

@StephaneMagne StephaneMagne force-pushed the stephane/projects_param branch from a4979f9 to c80d225 Compare January 26, 2023 22:27
@StephaneMagne StephaneMagne force-pushed the stephane/projects_param branch from c80d225 to a35cbbd Compare January 27, 2023 19:11
@@ -95,6 +100,7 @@ extension ConfigurationAttributeName: Codable {
case setter = "set"
case escaping = "e"
case platforms = "p"
case projects = "j"

Choose a reason for hiding this comment

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

Ahh J the most famous letter in the work "Projects" lol

Copy link
Contributor Author

@StephaneMagne StephaneMagne Jan 30, 2023

Choose a reason for hiding this comment

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

haha, you'll be reading it as "pro-Jects" from now on.

@StephaneMagne StephaneMagne merged commit 69f50d6 into master Jan 30, 2023
@StephaneMagne StephaneMagne deleted the stephane/projects_param branch January 30, 2023 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants