isapir commented on PR #731: URL: https://github.com/apache/tomcat/pull/731#issuecomment-2159528473
Thank you for your input on this @markt-asf - it makes sense to me, and is consistent with my proposed solution. > - Eclipse is configured to use the same Java version as the build (Java 22 in this case) This is what we have now. The reason that it is not working "out of the box" is that we also need to enable "Experimental" or "Preview" features as the FFM is not enabled in Java 22 by default, and should be enabled with a switch. I added that to the project at https://github.com/apache/tomcat/commit/f8eecc13b53fdca998565455d3c27e9b9a6cd8dc but reverted it after getting feedback above. We might want to reconsider adding back that flag, but if the user's IDE does not specify the latest Java version it breaks with an error that Experimental features can only be used with the latest Java SDK version, ATM 22. IMO it is reasonable to expect a user that is developing on the latest version of Tomcat, i.e. the `main` branch, to be using the latest Java SDK, which will work with the Experimental features flag. Users who use an older SDK will have to either disable that flag, or update to the latest SDK. But it is up to the user to choose how to configure their local environment. > - There are times when I have manually tweaked the build to exclude the packages that require Java 22 as I wanted to check something I was doing was still going to be Java 17 compatible and tweaking the IDE was easier than constantly running Ant. That is exactly the reason that I left the commented out lines that exclude the FFM directories in the project- making it easy to toggle the FFM directories by uncommenting or commenting back the lines. Keeping the exclusions in `res/ide-support/idea/compiler.xml` (or `res/ide-support/idea/tomcat.iml`, though I haven't tested that) commented out, allows the user to test the project with all of its features (e.g. FFM), and still make it easy to uncomment the lines and test without FFM on older SDKs. > As build.xml excludes openssl and panama directories from compilation, so should the IDE as well. @dsoumis That is not correct. The build.xml only excludes the FFM directories for Java versions < 22. See lines 1018 - 1033 which make use of the `use-ffm` flag at https://github.com/apache/tomcat/blob/main/build.xml#L1018 No settings will fit everyone 100% as IDEs set local environments with opinionated preferences, but the settings should be reasonable and fit most, and users can easily change the settings that do not fit their needs. We can improve the documentation and instructions to advise users how to configure the IDE, but disabling these directories in the IDE makes them unreachable when debugging/developing, and that's the primary reason to run Tomcat in an IDE. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org