| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
|
|
||
| <modelVersion>4.0.0</modelVersion> | ||
| <parent> | ||
| <groupId>org.tensorflow</groupId> | ||
| <artifactId>tensorflow-core</artifactId> | ||
| <version>0.4.0-SNAPSHOT</version> | ||
| </parent> | ||
| <artifactId>tensorflow-core-api-java9</artifactId> | ||
| <packaging>jar</packaging> | ||
|
|
||
| <name>TensorFlow Core Java 9 API Classes</name> | ||
| <description>Java 9 classes for the Tensorflow Core API</description> | ||
|
|
||
| <properties> | ||
| <java.module.name>org.tensorflow.core.api.java9</java.module.name> | ||
| <maven.compiler.source>9</maven.compiler.source> | ||
| <maven.compiler.target>9</maven.compiler.target> | ||
| <maven.compiler.release>9</maven.compiler.release> | ||
| <maven.install.skip>true</maven.install.skip> | ||
| </properties> | ||
|
|
||
| <dependencies> | ||
| </dependencies> | ||
|
|
||
| <build> | ||
| <plugins> | ||
| </plugins> | ||
| </build> | ||
| </project> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| /* | ||
| Copyright 2021 The TensorFlow Authors. All Rights Reserved. | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| ======================================================================= | ||
|
|
||
| */ | ||
| package org.tensorflow; | ||
|
|
||
| public class MRTest { | ||
| public static int version() { | ||
| return 9; | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
|
|
||
| <!-- | ||
| /* Copyright 2021 The TensorFlow Authors. All Rights Reserved. | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| ======================================================================= | ||
| */ | ||
| --> | ||
| <assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd"> | ||
| <id>mvjar</id> | ||
| <formats> | ||
| <format>jar</format> | ||
| </formats> | ||
| <includeBaseDirectory>false</includeBaseDirectory> | ||
| <moduleSets> | ||
| <moduleSet> | ||
| <useAllReactorProjects>true</useAllReactorProjects> | ||
| <includes> | ||
| <include>org.tensorflow:tensorflow-core-api</include> | ||
| </includes> | ||
| <binaries> | ||
| <unpack>true</unpack> | ||
| <includeDependencies>false</includeDependencies> | ||
| </binaries> | ||
| </moduleSet> | ||
| <moduleSet> | ||
| <useAllReactorProjects>true</useAllReactorProjects> | ||
| <includes> | ||
| <include>org.tensorflow:tensorflow-core-api-java9</include> | ||
| </includes> | ||
| <binaries> | ||
| <outputDirectory>META-INF/versions/9</outputDirectory> | ||
| <unpack>true</unpack> | ||
| <includeDependencies>false</includeDependencies> | ||
| <unpackOptions> | ||
| <excludes> | ||
| <exclude>/META-INF/**</exclude> | ||
| </excludes> | ||
| </unpackOptions> | ||
| </binaries> | ||
| </moduleSet> | ||
| </moduleSets> | ||
| </assembly> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| /* | ||
| Copyright 2021 The TensorFlow Authors. All Rights Reserved. | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| ======================================================================= | ||
|
|
||
| */ | ||
| package org.tensorflow; | ||
|
|
||
| public class MRTest { | ||
| public static int version() { | ||
| return 8; | ||
| } | ||
| } |
| Back | FazBrowse Home | New Git URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityAre you creating a new module to avoid errors in the IDE? Because I think there is a way to add java9+ source files in the same module (tensorflow-core-api) but in a separate folder, I'd personally prefer that.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityYeah, it's for IDE issues.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityI don't think we should design our project based on IDE's "bugs", they might come up with a fix later (if none already exists?).
I'd be curious to give it a try if you place the JDK9 sources in, let say, src/java9
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityYeah, in theory, but I think this one was pretty severe. If I remember right @JimClarke5 tried this (w/ source folders) but put it off because of the IDE issues? I'm going to try it.
This is also fully supported by maven (see https://maven.apache.org/plugins/maven-compiler-plugin/multirelease.html) so it's not like it's a hack.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityMaven handles them nicely, but InteliJ complains of duplicate classes for those classes with different implementations as it doesn't seem to understand the difference between the 2 Java versions.
There is an open issue at:
Add support for building Java 9 multi-release jars
and
IntelliJ support to multi-release jars
As of Feb 2021, these still seems to be an open issues.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityTesting it, it seems like you only get that error on the declarations, it's not that bad to just ignore. It keeps everything in the same module and has less maven configuration. There's no way to allow the source folder to use Java 9+ (or whatever) though, so using any 9+ APIs there will result in false positive errors. I'd prefer the multi-module solution, at least until those issues are fixed.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityI personally find the solution with multiple directories in the same module way cleaner, it requires almost no additional Maven configuration, nor any inter-module manual assembly, and it works like a charm outside the IDE.
I think it depends on how much code we want to put in these version-specific classes. If we just add the code that differs between JDK versions, then I'd be comfortable to just leave the src/main/java9 as a non-source directory by default and there will be no error. Of course the IDE won't be as efficient to assist you writing the code under that folder but it should be rare cases. But if we are heading to do full duplicates of the core classes (e.g. EagerSession), then it may become more painful. I would not recommend doing that though.
@Craigacp , any thoughts on this?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityThe only thing I had planed to put in there was some sort of Cleaner for resource scopes, so that should be fine.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.