-
-
Notifications
You must be signed in to change notification settings - Fork 347
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
Integrate ./mill init
with the example projects (500USD Bounty)
#3548
Comments
./mill init
with the example projects./mill init
with the example projects (500USD Bounty)
does it need to run interactively, prompting example number just like init is working now? |
@pawelsadlo no need interactivly for now, AFAIK $ ./mill init
Creating a new project...
Error: Missing argument <template>
Try --help for more information. I think it would be fine just to print out a big list of potential templates and then ask the user to copy paste the one they want for now. Once all the example templates are all wired up and in place, we can separately look at tweaking the CLI experience |
Ah right , the g8 template generation is interactive, not the init command. |
|
For the purpose of copy-and-paste in tutorials and readmes, it would be nice when |
@pawelsadlo |
@llvee |
@pawelsadlo let me know if you'd like some help with test writing. |
implements #3548 Modifying init to fetch examples from releases page instead of using g8 template This introduces new top-level module `initmodule` this module generates resource `exampleList.txt` containing json with array of pairs `(exampleId,exampleUrl)` `exampleId` and `exampleUrl` are formed based on already present `exampleZips` target, and `millVersion()`. initmodule introduces external module `MillInitModule` calls to` mill init ` are redirected to `MillInitModule.init` (basically the same logic as it was with `Giter8Module.init`) `MillInitModule.init` called without parameters prints message containing `exampleids` list based on generated exampleList.txt in the form of: ``` Run init with one of the following examples as an argument to download and extract example: depth/cross/1-simple depth/cross/2-cross-source-path ... ``` When called with a parameter it validates if passed parameter is in the list, and if so, it downloads example from github releases page and unpacks it into the directory from where the command was run. --------- Co-authored-by: Li Haoyi <[email protected]>
I think accepting a |
From the maintainer Li Haoyi: I'm putting a 500USD bounty on this issue, payable by bank transfer on a merged PR implementing this.
Mill's
example/
folder projects are all zipped up and published for download with every release, and form a far more comprehensive and richly documented set of project templates than is available on giter8. We should update./mill init
to prioritize using these examples as getting started templates for users using./mill init
. We can continue to support giter8 if we want, but I expect the built in example templates will be what people want 99% of the time and render external giter8 templates largely unnecessary.Success criteria:
./mill init
without any argument, it shows the user a list of all the Millexample/
projects, grouped and organized in some meaningful wayjavalib/basic/1-simple
) and Mill will download the project from the Mill Releases page and unpack it into the local directoryThe list of valid examples can vary between Mill versions, and should be computed at build time as a resource generator and bundled together with Mill during creation of its
dist.assembly
.The text was updated successfully, but these errors were encountered: