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

Move to Giter8 #38

Open
seldridge opened this issue Oct 3, 2018 · 6 comments
Open

Move to Giter8 #38

seldridge opened this issue Oct 3, 2018 · 6 comments

Comments

@seldridge
Copy link
Member

I propose that we move this into a Giter8 project. This simplifies what the user has to do down to one line:

sbt new seldridge/chisel-template.g8

You also have some ability to customize the project with some super idiotic (m4-level) string replacement.

I have an example version (using the release branch as opposed to master) here:

@edwardcwang
Copy link
Contributor

edwardcwang commented Oct 3, 2018

I think it could be an additional option. I do think it's worthwhile to still keep around chisel-template as the main option, though (maybe make the Giter8 project mirror/submodule chisel-template) since it is easier to use/understand if you already know git.

(Also sbt is slow as usual but that's more of a side comment)

@seldridge
Copy link
Member Author

The thought occurred to me about having the submodule. However, I'm really of the opinion that we should coalesce around one source of information for new users. This does put a dependency on having sbt installed.

Also, Giter8 can avoid the tediousness of three existing steps in the current chisel-template README.md:

  1. No need to rm -rf .git
  2. The project name is populated for you via a prompt
  3. (Not implemented, but) We can prepoluate the README.md for you (project name, etc.)

Basically, get out of the way of the users as fast as possible.

(Also sbt is slow as usual but that's more of a side comment)

Yeah, there's that sbt start-up time... Granted, it's a one-time cost.

Just to be clear, this is what the workflow looks like with Giter8:

> sbt new seldridge/chisel-template.g8
[info] Loading settings from plugins.sbt ...
[info] Loading global plugins from /home/se/.sbt/1.0/plugins
[info] Set current project to tmp (in build file:/home/se/tmp/)
name [My Chisel Project]: Some Cool Awesome Project       

Template applied in ./some-cool-awesome-project

> cd some-cool-awesome-project
> sbt test
[info] Loading settings from plugins.sbt ...
...
[info] ScalaTest
[info] Run completed in 3 seconds, 416 milliseconds.
[info] Total number of tests run: 5
[info] Suites: completed 1, aborted 0
[info] Tests: succeeded 5, failed 0, canceled 0, ignored 0, pending 0
[info] All tests passed.
[info] Passed: Total 5, Failed 0, Errors 0, Passed 5
[success] Total time: 19 s, completed Oct 2, 2018 10:12:36 PM

@edwardcwang
Copy link
Contributor

edwardcwang commented Oct 3, 2018

I think one additional angle to consider is that we might be able to use alternative build systems like mill in the future, so I'm not sure that the default path to using Chisel should have more dependence on sbt. I think I'm okay if we add g8 as an additional option but I'm not sure I'm feeling super on board with removing the vanilla template, though.

@jackkoenig
Copy link
Contributor

I should note that I'm actively working on building rocket-chip with mill.

Is there any integration of giter8 with mill?

@seldridge
Copy link
Member Author

Re: mill... As far as I could dig up: no. This also appears to have been punted on internally:

Granted, there's technically nothing too interesting that g8 is doing other than fetching a project from GitHub and doing some substitution---it could conceivably work to give you a mill project (or any project). This is horribly inelegant though with a one-time-use sbt dependency.

Fundamentally, I think that the Chisel template should be scaffolding and not a git repository a user clones. I'm also not big on downloading an example project tarball, either. While the mill logic of "everyone is using git" is sound, the hardware world is one of versioned tarballs... It just seems like putting the burden of understanding git or running a bunch of commands a user may not understand is enough reason to turn users off (who are looking for reasons to be turned off). This, however, is relatively shaky reasoning (the setup isn't that complex...) and most users should be fine with a git repo.

@edwardcwang
Copy link
Contributor

I mean if people don't want to use git it's as simple as wget https://github.com/freechipsproject/chisel-template/archive/release.zip...

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

3 participants