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

declarative script plugin dependencies #8

Open
nedtwigg opened this issue Jan 10, 2020 · 0 comments
Open

declarative script plugin dependencies #8

nedtwigg opened this issue Jan 10, 2020 · 0 comments
Labels
enhancement New feature or request pr-welcome Extra attention is needed

Comments

@nedtwigg
Copy link
Member

nedtwigg commented Jan 10, 2020

It is common that script plugins will need to be applied in a specific order. It would be nice if these scripts gave nice declarative error messages if this was violated. Here is a draft API:

/**
  * Throws an error if `('base/java')` hasn't already been applied.
  * (Must be called only from within a script plugin.)
  */
void 干.requires('base/java') { ... }

/**
  * Throws an error if `('base/scala')` has been applied,
  * or if it is applied in the future.
  * (Must be called only from within a script plugin.)
  */
void 干.mutuallyExclusiveWith('base/scala') { ... }

/**
  * If `base/java` has already been applied, or is never applied, then this is fine.
  * But if `base/java` is ever applied in the future, then there will be an error,
  * because this plugin must run after 'base/java'.
  * (Must be called only from within a script plugin.)
  */
void 干.mustRunAfter('base/java') { ... }

void 干.mustRunBefore('base/java') { ... }
@nedtwigg nedtwigg added enhancement New feature or request pr-welcome Extra attention is needed labels Jan 10, 2020
nedtwigg added a commit to diffplug/blowdryer-diffplug that referenced this issue Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pr-welcome Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant