Open tmulle opened 2 weeks ago
/cc @alesj (grpc), @cescoffier (grpc)
Do you get this only on Fedora 39?
We pull all os/architectures in our dependencies. We know that it's sub-optimal, but we have to do it to make sure we can build the proto files.
Yes, it works fine on MacOS.
Interestingly enough, ALL dependencies get pulled no matter what the OS.
This is on my repo on MacOS which ironically gets pulled through our corporate Nexus mirror. But I don’t see the dependencies actually stored on our Nexus, but somehow it works for MacOS but fails on Fedora 39.
ls ~/.m2/repository/io/grpc/protoc-gen-grpc-java/1.65.1/
_remote.repositories protoc-gen-grpc-java-1.65.1-linux-x86_64.exe.sha1
protoc-gen-grpc-java-1.65.1-linux-aarch_64.exe protoc-gen-grpc-java-1.65.1-osx-aarch_64.exe
protoc-gen-grpc-java-1.65.1-linux-aarch_64.exe.sha1 protoc-gen-grpc-java-1.65.1-osx-aarch_64.exe.sha1
protoc-gen-grpc-java-1.65.1-linux-ppcle_64.exe protoc-gen-grpc-java-1.65.1-osx-x86_64.exe
protoc-gen-grpc-java-1.65.1-linux-ppcle_64.exe.sha1 protoc-gen-grpc-java-1.65.1-osx-x86_64.exe.sha1
protoc-gen-grpc-java-1.65.1-linux-s390_64.exe protoc-gen-grpc-java-1.65.1-windows-x86_32.exe
protoc-gen-grpc-java-1.65.1-linux-s390_64.exe.lastUpdated protoc-gen-grpc-java-1.65.1-windows-x86_32.exe.sha1
protoc-gen-grpc-java-1.65.1-linux-s390_64.exe.sha1 protoc-gen-grpc-java-1.65.1-windows-x86_64.exe
protoc-gen-grpc-java-1.65.1-linux-x86_32.exe protoc-gen-grpc-java-1.65.1-windows-x86_64.exe.sha1
protoc-gen-grpc-java-1.65.1-linux-x86_32.exe.sha1 protoc-gen-grpc-java-1.65.1.pom
protoc-gen-grpc-java-1.65.1-linux-x86_64.exe protoc-gen-grpc-java-1.65.1.pom.sha1
I will try to get a fedora 39 to test it, but I don't have a specific nexus server.
Do you know if the issue occurs if we use a fedora 39 base docker image?
So the problem is this thing: https://github.com/quarkusio/quarkus/blob/main/extensions/grpc/codegen/pom.xml#L28-L135 .
I think we should try to reduce the dependencies by having profiles enabled with arch.
Using os family + arch profile, I think we should be able to reduce this significantly. I don't think we need to catch all the corner cases, we could at least greatly reduce the dependencies if matching os and arch.
@tmulle maybe that's something you could create a PR for?
@gsmet sure I can submit one. I’ll modify the pom.xml to have different profiles based on the os and arch.
@gsmet why did you re-open it?
Ok, seems to break tests...
I had a memory flash this morning - this is precisely why it was not done like this 3/4 years ago. I remember Michal complaining about it :-)
That's a shame..I still get my first PR to Quarkus badge right? ;-)
So, since I'm new to the Quarkus build process why did this ultimately fail?
Did I not run the right test by using mvn -Dquickly
? I guess github actions or your CI process runs deeper tests that this caught?
Why do we use Gradle and Maven together?
I did just read about Gradle and Maven profile activation and people seem to try to get around it by writing properties to files or changing the gradle builds to read the System env variables directly using if/then code branches.
Like I said in my commit/PR message I did try to read the os.detected.classifier
directly in the two protoc dependencies but that didn't work because it couldn't find the variables..which is interesting because at the beginning of the builds all of those variables are printed out.
I thought you might be using this plugin which sets the variables and can be used in the builds: https://github.com/trustin/os-maven-plugin
But I'm not sure if Gradle would be able to read them..
I just saw there is a Gradle version of the plugin I mentioned and it actually uses the same maven plugin under the hood. https://github.com/google/osdetector-gradle-plugin
So, I wonder if reading the os.detected.classifer
could ultimately work.
Then no more need for profiles.
Describe the bug
When creating a new app using the quarkus start webpage which just contains GRPC extension and trying to compile it on Fedora 39 fails:
We have a corporate Nexus server which is mirroring Maven Central and it should be pulling automatically, but that's another issue. The real issue is why is GRPC trying to pull unecessary dependencies?
Why is GRPC trying to pull IBM s390 on a Linux Fedora 39 system?
This is the POM.xml that was generated by the quarkus webpage:
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
No response
Output of
uname -a
orver
Linux 6.10.6-100.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Aug 19 14:35:32 UTC 2024 x86_64 GNU/Linux
Output of
java -version
JDK 21 and JDK17
Quarkus version or git rev
3.14.1
Build tool (ie. output of
mvnw --version
orgradlew --version
)Maven
Additional information
No response