-
-
Notifications
You must be signed in to change notification settings - Fork 363
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
Reuse out folder among different machines/directories #2101
Comments
We're open for discussion and development to support such scenarios. We discussed some aspects of it in the past and I'd like to reference it here FYI: |
Although |
Yes I just checked those infos befor submitting this issue. Let me know what I can contribute to make this happening. |
Actually, for the build script trigger reevaluating issue, I wonder if it’s possible to manually give each Module a version to reduce this behavior, which may give the chance to throw rebuild burden to users. |
Maybe another idea: When walking the directory subtree rooted at The reasoning is that if two directory tree has the same shape and the same content, we should consider them the "same" directory in the sense of caching. In this implementation, moving the entire subtree |
another(maybe unrelative) question is: |
Well, currently So splitting it structurally on the smallest part might be overkill. But as @sequencer suggested, just keeping the info stable relative to I think some experiments or creating a POC wouldn't hurt and could be fun. Got for it! About the other issue, tracking the origin of a change, this should be probably discussed separately. But once, we invent some tracking, the whole user experience might change. And I fear not to the better. It might result in more complicated API for Input/Output types, for example. That's just a feeling though. Currently, hash-based change detection isn't easy to track (although Mill evaluator knows exactly which tasks were out of date, see |
I'm trying to get minimal implementations of both approaches tested:
It seems that the CI still needs a few hours to complete. Meanwhile, I'll try to check if these changes allow us to move cache directories. UPDATE: a test failed because the repo name is different. Unfortunately, I already have a repo named mill, so cannot fork the repo using that name. I'll try to fork it into another organization and rerun CI. |
All build and test jobs should not depend on the repo name. Only jobs, that in some way do release or publishing are bound to the repo name. You can also open a draft PRs, then the appropriate CI jobs will run on Mill repo. |
Maybe, it's necessary to have some predefined, named path anchors, from which we can start digesting. |
What I have been dreaming that |
We probably need to try to resolve the // pseudo code
// defined at Mill startup time
val knownLocs: Seq[(PathName, Path)] = Seq(
"out" -> outPath,
"workspace" -> T.workspace,
"coursier-cache" -> cachePath
)
// called at PathRef creation time
def createPathRef(path: Path): PathRef = {
knownLocs.find { case (name, prefix) => path isSubPathOf prefix } match {
case Some((name, prefix)) => // create a PathRef with sub-path and virtual base path
case None => // create a non-portable PathRef with absolute path
}
}
|
Just some mockup $ mill show main.jar
"vref:843cb117:out:main/jar.dest/out.jar"
$ mill show main.sources
[
"vref:2318a653:workspace:main/src"
] |
I experimented with this a bit. In my first iteration, I made the I will open a PR with the decoupling of In addition to a Additionally, we need an type to transport a path disregarding the content. This is almost a thin wrapper around The current To make the Mill cache distributable, we also need to refactor some targets, e.g. a compile target should not depend on targets that return |
|
Do exist cases when paths in the |
Currently, |
@lolgab To your second question: We already store paths that are located outside of the |
|
I’m using mill to manage a relative big system. A usage is forking entire workspace , including 'out', sending to other machines, executed some thing else, fork and send again and again. This is used for distributing works to different nodes.
however due to the absolute path in
PathRef
,out
cannot be directly packaged and sent away.Thus I’m proposing to make the
path
inPathRef
relative toT.ctx.workspace
to reduce the dependency to environment out of build context.The text was updated successfully, but these errors were encountered: