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

Bleep plugins #333

Open
markehammons opened this issue Jun 29, 2023 · 1 comment
Open

Bleep plugins #333

markehammons opened this issue Jun 29, 2023 · 1 comment

Comments

@markehammons
Copy link

markehammons commented Jun 29, 2023

Right now, the way to add "plugins" to bleep seems to be the following behavior:

  1. add a project named "plugins" or whatever you want to your bleep build
  2. add the script/plugin as a dependency of plugins
  3. In scripts, add a name for each plugin along with its main class

example:

projects: 
  plugins:
    dependencies:
      - fr.hammons::scoverage:0.0.0+1-93d77daa+20230629-1154-SNAPSHOT
    extends: template-base

scripts:
  scoverage-report: plugins/fr.hammons.bleep.scoverage.ScoverageReport
    
templates: 
  template-base: 
    platform: 
      name: jvm 
    scala: 
      version: 3.3.0

Is there some way we could streamline this a bit? Maybe have a plugins section that creates a "project" and "script" for each bleep plugin dependency?

@oyvindberg
Copy link
Owner

Not sure, for me I think this is a fine level of ceremony. The current approach is flexible in many dimensions and should scale up to very big projects.

  • one build can have zero to many "script projects" (like plugins in this case)
  • one script project can have zero to many dependencies
  • one script project can have zero to many scripts/classes with main
  • the scripts part of the build file can refer to zero to many scripts in different script projects.

Basically I think any simplification of this will make less flexible, and we'll end up with different syntaxes to describe the same thing.

Note that the scripts section could in theory be inferred by compiling the scripts projects and scanning the class path, but that is not an option since performance is a hard requirement.

So that's how I see it now, but feel free to float any ideas and let's see if it goes somewhere! :)

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

No branches or pull requests

2 participants