On Fri, 5 Apr 2024 10:11:02 GMT, Magnus Ihse Bursie <i...@openjdk.org> wrote:

> The syntax for specifying JDK libraries can of course be discussed. I tried 
> to align it with the current syntax for specifying source code, but it does 
> not match 100%. The differences are:
> 
> * For source code, the default module is the current module, since the most 
> common use is to include additional source directories from the current 
> module. For libs, the default module is "java.base", since the by far most 
> commonly included libs are `libjvm` and `libjava`.
> * For source code, the full name of the directory is needed, so to include 
> the `libjava` directory the name `libjava` needs to be specified. For 
> libraries, the "lib-" prefix is dropped, and just the base name of the 
> library is used, e.g. `java`.
> 
> This started out as a gradual extension of the use of e.g. `-ljava`, but 
> after working with this patch for quite some time, I am not convinced it is 
> ideal. If we were to align the syntax of libraries completely with source 
> code, then the code will typically look like this:
> 
> ```
>     JDK_LIBS := libawt java.base:libjvm java.base:libjava, \
> ```
> 
> instead of (as currently in the patch):
> 
> ```
>     JDK_LIBS := @:awt jvm java, \
> ```
> 
> It is longer, for sure, but maybe that does not matter as much. And it is 
> definitely clearer.
> 
> Comments are welcome!

I missed this comment when I first reviewed the code and already wrote 
something about this. Now I see you already suggested more or less the same 
change I did. I would prefer the longer format. It's more verbose, but it 
becomes more readable, due to consistency with the headers parameter. It's also 
less error prone when writing for the same reason. I'm not a big fan of 
introducing special meaning to characters like `@`. Having the default be the 
current module feels natural to me.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/18649#issuecomment-2040524133

Reply via email to