This may have nothing to do with your issue, but I recently discovered that javafx support does not seem to be modular java aware. For example

   /f/repos/nb/netbeans/java
   $ srcgrep module-info |grep -E -v '/build/|/test/'|wc
        144    1338   25468

but

   /f/repos/nb/netbeans/javafx
   $ srcgrep module-info |grep -E -v '/build/|/test/'|wc
          0       0       0

This output may be particularly important since there does not seem to be any common/public modular java api. Most projects, I've filed an "Improvement" issue:

   NETBEANS-4765 module-info utilities for common usage

I ran into this fixing the prominent issue, with JavaFX Empty-FXML wizard, and filed a 2nd

   NETBEANS-4718 NewFile>JavaFX2>EmptyFXML default controller placement
   causes runtime error
   NETBEANS-4764 EmptyFXML wizard does not fixup module-info as needed

Both these issues have directly to do with modular java. I've got about 10 issues I'm filing involving refactoring, module-info, javafx. and/or fxml-editor-error-badges from looking at the one wizard. I think this is the tip of an iceberg.

(Don't see a way to create an umbrella issue, and I got no response to my question about it, so I'm still pondering how to link together these various issues I want to file. Only filed 4 so far)

-ernie

On 9/4/2020 10:16 AM, Laszlo Kishalmi wrote:
I'm trying to fix the error badges on JavaFX test code.

Most of the imports giving "package is declared in unnamed module" error. I came across with https://github.com/BetterCloud/vault-java-driver which has the same issue, though it's build script is more reasonable. The interesting thing is, if I remove the module-info.java from the main sourceset everything sets to be right.

I've read halfway through https://sormuras.github.io/blog/2018-09-11-testing-in-the-modular-world.html and it seems for testing these projects are reverting back from modular java to classpath java (correct me if I'm wrong).

As far as I've checked (placed a breakpoint in the code) I do not see that NetBeans is requesting modulepath for the test code, still it threats that code if it was modular. At least that's what I think.

As we have some good folks here who are really into the compiler/java business, I'd ask, how shall we handle such test sourcesets?

Is it a bug in NetBeans that only if the main sourceset is modular, then the whole project would be treated like that?

So some guidance would be really appreciated.

--

  Laszlo Kishalmi


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists






---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Reply via email to