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

Have publishLocal accept an option such as --doc=false to disable doc JAR generation #2487

Open
alexarchambault opened this issue May 1, 2023 · 4 comments · May be fixed by #3512
Open

Have publishLocal accept an option such as --doc=false to disable doc JAR generation #2487

alexarchambault opened this issue May 1, 2023 · 4 comments · May be fixed by #3512

Comments

@alexarchambault
Copy link
Contributor

alexarchambault commented May 1, 2023

I often find myself disabling doc JAR stuff in publishLocal, as doc JAR generation can be slow (in Scala 2, it basically recompiles your code I think) or buggy (Scala 3 doc JAR sometimes just crashes in some modules of mine), and I usually don't need those when publishing something locally.

It'd be nice if the publishLocal command accepted a --doc=false option, to disable doc JAR generation. That way, users wouldn't have to override publishLocal (and copy-paste most its original implementation) to achieve that.

@alexarchambault
Copy link
Contributor Author

I'd gladly send a PR to tweak the current implementation. Do you think an integration test for that should be added under integration/?

@lihaoyi
Copy link
Member

lihaoyi commented May 1, 2023

Sounds great. I think a unit test in scalalib would be enough:

  1. This change wouldn't affect the Mill script runner or bootstrap processes, which is mostly what the integration/ tests cover
  2. This is probably a small enough feature that we don't need to add an example/ test.

We should also make use of it in our own build.sc for when we publishLocal as part of installLocal; that would probably make the workflow a lot faster, and also serve as validation that the feature works

@lefou
Copy link
Member

lefou commented May 1, 2023

Good idea. It could also speed up mill-integrationtest plugin.

@lefou
Copy link
Member

lefou commented May 2, 2023

There are probably two expected behaviors. One is to not publish a doc jar, the other is to still publish a doc-jar, but an empty one. This might help in situation where some minimal doc jar helps in workflows that expect one. Should we support both (--doc=none / --doc=empty) or only the first case?

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

Successfully merging a pull request may close this issue.

3 participants