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

Additional native requires #819

Merged
merged 10 commits into from
Nov 28, 2019
Merged

Conversation

HGuillemet
Copy link
Collaborator

@HGuillemet HGuillemet commented Nov 22, 2019

When using JPMS, presets that depend on other presets should include a requires from the native module of the dependent to the native module of the dependency.
Without such requires dependency native module wont be brought into the module graph.

Adding the nativeRequires property to simplify this.

I set this property to all presets with a maven dependency to another presets. Maybe some of these should be static (optional) requires instead ?

@saudet
Copy link
Member

saudet commented Nov 26, 2019

We're getting build errors like this for at least MXNet and TensorFlow::

[ERROR] Failed to execute goal org.moditect:moditect-maven-plugin:1.0.0.Beta2:add-module-info (add-module-infos) on project tensorflow: Execution add-module-infos of goal org.moditect:moditect-maven-plugin:1.0.0.Beta2:add-module-info failed: (line 3,col 45) Parse error. Found "-", expected ";"
[ERROR] Problem stacktrace : 
[ERROR]   com.github.javaparser.GeneratedJavaParser.generateParseException(GeneratedJavaParser.java:10419)
[ERROR]   com.github.javaparser.GeneratedJavaParser.jj_consume_token(GeneratedJavaParser.java:10278)
[ERROR]   com.github.javaparser.GeneratedJavaParser.ModuleStmt(GeneratedJavaParser.java:5505)
[ERROR]   com.github.javaparser.GeneratedJavaParser.ModuleDeclaration(GeneratedJavaParser.java:5654)
[ERROR]   com.github.javaparser.GeneratedJavaParser.CompilationUnit(GeneratedJavaParser.java:322)
[ERROR]   com.github.javaparser.JavaParser.parse(JavaParser.java:136)
[ERROR]   com.github.javaparser.JavaParser.simplifiedParse(JavaParser.java:342)
[ERROR]   com.github.javaparser.JavaParser.parse(JavaParser.java:314)
[ERROR]   org.moditect.internal.compiler.ModuleInfoCompiler.parseModuleInfo(ModuleInfoCompiler.java:69)

@HGuillemet
Copy link
Collaborator Author

Fixed.
Any module-info line could be specified in the nativeRequires property. So we could find a better name for the property. Even though I doubt there will be cases were we need to add something else than a requires.

@saudet saudet merged commit b65fbf1 into bytedeco:master Nov 28, 2019
@HGuillemet HGuillemet deleted the hg_additionalRequires branch December 24, 2019 13:02
@HGuillemet HGuillemet restored the hg_additionalRequires branch August 5, 2024 10:21
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.

2 participants