-
Notifications
You must be signed in to change notification settings - Fork 112
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
Skip dependencies of native tasks with --no-native #213
Conversation
When creating the build schedule, if `--no-native` is passed as a parameter to `mx build` all tasks dominated by an `AbstractNativeBuildTask` (including the `AbstractNativeBuildTask` itself) are removed from the schedule to avoid fetching and building unnecessary dependencies. Closes: oracle/graal#2221
@dougxc can you please review this? |
The We should not prune the task DAG we should rather try to only get what we want in the roots in the first place. How are you using |
I guess that comment is not directly related to the PR since
True, that would solve other problems as well and speedup builds. It's significantly more work though :)
We use it to generate the necessary jars that we then use both as maven artifacts and as libraries for mandrel's native-image. |
Right, I'm just saying that their behaviour is to skip the native parts, still building everything else, regardless of dependencies.
I think it's much simpler in terms of code. One approach could be to add a pseudo dependency such as |
Hi @gilles-duboscq sorry for the late reply. The following quote from Doug Simon (oracle/graal#2221 (comment)) seems to indicate that this is not "much simpler in terms of code" though:
It's not clear to me how the use of a pseudo dependency would solve the issue. As Doug points out "all projects, dists, library and custom dependencies are considered as roots", thus even with a |
Hi @gilles-duboscq this is a kind reminder :) |
This a the default when you don't specify what you want to build. If you provide Maybe we should start from the beginning: what are you trying to achieve? I have assumed so far that you just want to build the jars of a suite and you would like not to be bothered by unrelated build steps such as the download of some sources for a native build. |
Our ultimate goal is to be able to build Mandrel using mostly mandrel-packaging is currently building
which fetches |
OK, i see. But what is the purpose of I suppose you are trying to work around the dependency of these jars on the It seems that |
Internally we build the Java bits separately from the native bits.
Correct.
That's also correct and we explicitly remove some of the dependencies by altering
That would be great. |
@olpaw doing so would allow us to stop "patching" the suite files to remove the corresponding dependencies. |
@olpaw could you also please have a look at this? (the discussion mostly, not necessarily the PR itself) |
From a quick glance, wouldn't this be solved by not having GraalVM component |
The issue of fetching The current issue is that despite using:
We are still building a bunch of unnecessary dependencies. With some trial and error I was able to manually remove a number of TRUFFLE-related dependencies from Mandrel. So the question now is: Do you think the Truffle & NFI support could be split out to a separate jar as to reduce our dependencies without manually patching the suite files when building Mandrel? Thanks |
That would require mx projects While that is technically possible, it would require quite some work. Also I worry about breaking compatibility with other projects that (knowingly or not) depend on This is a topic best discussed in an upcoming "Native Image Committer Community Meeting" |
Fwiw, the |
Closing as out of date. |
When creating the build schedule, if
--no-native
is passed as aparameter to
mx build
all tasks dominated by anAbstractNativeBuildTask
(including theAbstractNativeBuildTask
itself) are removed from the schedule to avoid fetching and building
unnecessary dependencies.
Closes: oracle/graal#2221