smiklosovic commented on code in PR #2320:
URL: https://github.com/apache/cassandra/pull/2320#discussion_r1248200777
##########
build.xml:
##########
@@ -1808,11 +1816,21 @@
<option name="ADDITIONAL_OPTIONS_STRING" value="--add-exports
java.rmi/sun.rmi.registry=ALL-UNNAMED" />
</component>
</project>]]></echo>
- <echo>"IDE configuration updated for use with JDK11"</echo>
+ <echo>"IDE configuration updated for use with
JDK${ant.java.version}"</echo>
+ <echo>Please note that `ant realclean` does *NOT* remove
IntelliJ-specific files</echo>
+ <echo/>
+ <echo>Warning! If you observer strange behavior in IntelliJ please</echo>
+ <echo>verify that the SDK that is being used is indeed version
${ant.java.version}.</echo>
+ <echo>The used JDK version can be verified in Project Structure/Project
Setting/Project</echo>
+ <echo>and Project Structure/Platform Setting/SDKs</echo>
+ <echo>In particular it is worth checking if the used JDK, typically
named "${ant.java.version}",</echo>
+ <echo>indeed points to a java ${ant.java.version} installation.</echo>
</target>
<!-- Generate IDEA project description files -->
<target name="generate-idea-files"
depends="init,resolver-dist-lib,gen-cql3-grammar,generate-jflex-java,createVersionPropFile"
description="Generate IDEA files">
+ <delete dir=".idea"/>
Review Comment:
I find worktree very convenient here. There is no need to switch jdks at all.
I have `.sdkmanrc` is each worktree
20:53 $ git worktree list
/home/fermat/dev/cassandra/cassandra-instaclustr/cassandra
e9d2802953 [CASSANDRA-18467]
/home/fermat/dev/cassandra/cassandra-instaclustr/cassandra-3.0
4ea7bb25b4 [cassandra-3.0]
/home/fermat/dev/cassandra/cassandra-instaclustr/cassandra-3.11
d3f29c2602 [CASSANDRA-14204]
/home/fermat/dev/cassandra/cassandra-instaclustr/cassandra-4.0
b0f1ef9832 [CASSANDRA-14204-4.0]
/home/fermat/dev/cassandra/cassandra-instaclustr/cassandra-4.1
c3327855e4 [cassandra-4.1]
/home/fermat/dev/cassandra/cassandra-instaclustr/cassandra-trunk-j11
bbe17c23f6 [CASSANDRA-18467-j11]
/home/fermat/dev/cassandra/cassandra-instaclustr/cassandra-trunk-j17
8563757422 [trunk-j17]
So I have 3 separate IDEA windows for each trunk, trunk on j11 and trunk on
j17.
Then in each dir I have .sdkmanrc like
✔ ~/dev/cassandra/cassandra-instaclustr/cassandra-trunk-j17 [trunk-j17
L|✔]
20:54 $ cat .sdkmanrc
java=17.0.7-tem
or
✔ ~/dev/cassandra/cassandra-instaclustr/cassandra-trunk-j11
[CASSANDRA-18467-j11 L|✔]
20:55 $ cat .sdkmanrc
java=11.0.19-tem
and I have .sdkmanrc in `~/$HOME/.gitignore` as well as this in
~/$HOME/.sdkrcman/etc/config
sdkman_auto_env=true
That means that as I am switching the worktree directories, Java invoked in
that Cassandra project root dir is changed dynamically as well upon every "cd".
This was a long explanation why I do not need to have a target which cleans
generated files for IDEA - I never regenerate them. And currently that
directory is clean upon each generation. So really, why we need a target? In my
case never.
I was thinking that I actually bring some benefit to a user by clean target
but is there really any if the dir it is going to generate it into is wiped out
anyway?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]