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

Add and implement new --onlydeps option #2773

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft

Add and implement new --onlydeps option #2773

wants to merge 12 commits into from

Conversation

lefou
Copy link
Member

@lefou lefou commented Sep 20, 2023

With the new --onlydeps CLI option, we can evaluate all dependencies except the requested targets itself. This comes in handy to prepare some offline work. It's also useful when a target itself is able to watch an handle a change of it's inputs (like a Spring Boot or Vaadin app) but Mill is still needed to watch and re-build all the other dependencies.

Example: Just re-prepare the dependencies but don't restart the server

$ mill server.runBackground
$ mill --watch --onlydeps server.runBackground

The name --onlydeps is borrowed from emerge the CLI of the Gentoo package manager Portage.

Depends on

Fix #2748

@lefou lefou marked this pull request as ready for review September 20, 2023 13:37
@lefou lefou marked this pull request as draft September 21, 2023 09:05
@lefou lefou force-pushed the only-deps branch 2 times, most recently from ff33686 to b6c7027 Compare September 23, 2023 15:08
@lefou lefou changed the base branch from main to millexception September 27, 2023 06:46
Base automatically changed from millexception to main September 27, 2023 18:08
@sequencer
Copy link
Contributor

I looked around and saw this PR.
I wonder if it would be possible to provide a tool from mill to expose all ivy as json as the lock file. Later we can use this lockfile to download it w/ coursier to prepare the build artifacts for no network building.
A dirty hack has been achieved in https://github.com/chipsalliance/t1/blob/master/nix/pkgs/mill-builder.nix
I wonder if there are some clean way to use. E.g. this PR.

@lefou
Copy link
Member Author

lefou commented Apr 23, 2024

I wonder if it would be possible to provide a tool from mill to expose all ivy as json as the lock file.

It certainly is possible, but it looks unrelated to this PR. --onlydeps in this context means: "build only the target dependencies".

@sequencer Please open a dedicated discussion for your topic, thanks.

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 this pull request may close these issues.

Provide a --onlydeps option, to build all deps of a given target excluding the target itself
2 participants