Skip to content

declarative script plugin dependencies #8

Open
@nedtwigg

Description

@nedtwigg

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') { ... }

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpr-welcomeExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions