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

Change the signature of plugin make* functions #97

Merged
merged 1 commit into from
Jul 7, 2024

Conversation

elliotgoodrich
Copy link
Owner

A while ago @ninjutsu-build/core was updated so that NinjaBuilder.rule could take any properties and these were taken as the default value for any build edges created with this rule.

However, it was not possible to pass through arbitrary values for implicitDeps or orderOnlyDeps in the plugins, or to set defaults that we use ourselves (e.g. configPath for @ninjutsu-build/biome).

All plugin exports take an optional object as the second parameter instead of an optional string for the rule name. This optional object can take the name, implicitDeps, orderOnlyDeps, and any rule-specific defaults that make sense. Right now this is just configPath for @ninjutsu-build/biome, but later on we can add more.

A while ago `@ninjutsu-build/core` was updated so that
`NinjaBuilder.rule` could take any properties and these were taken as
the default value for any build edges created with this rule.

However, it was not possible to pass through arbitrary values for
`implicitDeps` or `orderOnlyDeps` in the plugins, or to set defaults
that we use ourselves (e.g. `configPath` for `@ninjutsu-build/biome`).

All plugin exports take an optional object as the second parameter
instead of an optional string for the rule name.  This optional object
can take the name, `implicitDeps`, `orderOnlyDeps`, and any
rule-specific defaults that make sense.  Right now this is just
`configPath` for `@ninjutsu-build/biome`, but later on we can add more.
@elliotgoodrich elliotgoodrich merged commit d60313a into main Jul 7, 2024
12 checks passed
@elliotgoodrich elliotgoodrich deleted the update-makerule-parameters branch July 7, 2024 08:06
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.

1 participant