scala-cli icon indicating copy to clipboard operation
scala-cli copied to clipboard

Add supports for using Source Generator using Directives

Open Perklone opened this issue 1 year ago • 1 comments

Address #610. Will be a Draft PR until we can get a conclusion regarding the design of how we want to approach having the source generator

This is a concept PR that I had in mind, also discussed with @bishabosha and @kannupriyakalra aswell.

The idea is that use the source generator via directives that would look something like this:

project.scala:
//> using sourceGenerator.scripts ${.}/generator/generator.scala <- This one for specifying the path of the generator
//> using sourceGenerator.excludeScripts true <- to make sure that the generator file is not run from the original scala-cli runner

in your generator file:

generator.scala:
//> using sourceGenerator.inputDirectory "${.}/../source-generator-input" <- Directory where the data file is located
//> using sourceGenerator.glob "glob:test.in" <- Type of files that will be taken to the Bloop Server

Perklone avatar Jul 17 '24 11:07 Perklone

https://github.com/VirtusLab/scala-cli/pull/3035 in case there's anything we can reuse, kudos to @MaciejG604

Gedochao avatar Jul 17 '24 13:07 Gedochao

@Perklone @bishabosha
Hey, what's the status on this? As far as I know, this should be unblocked on Bloop's side (cc @tgodzik). Let me know if you need help.

Gedochao avatar Nov 04 '24 10:11 Gedochao

Hello, currently there are no update with this atm since I haven't found much time recently, hoping that I can continue sometime soon though.

Perklone avatar Nov 04 '24 10:11 Perklone

no updates from me either

bishabosha avatar Nov 04 '24 17:11 bishabosha

Hey @Perklone how is it going, would you consider picking this up again?

bishabosha avatar Feb 17 '25 14:02 bishabosha

I wanted to, but unfortunately still haven't got the time, if someone wanted to pick this up, i'll be okay with it. But if not, I'll try to work on it on weekends

Perklone avatar Feb 17 '25 14:02 Perklone