sdedic opened a new pull request, #4287:
URL: https://github.com/apache/netbeans/pull/4287

   In a mixed-language project, such as `micronaut-core/http`, each language 
produces the output typically to a separate folder, although the output is in 
form of .class files.
   
   Currently Gradle project knows the set of output folders, but does not know 
what language produces output in which particular one, so backwards mapping in 
`SourceForBinaryQuery` provides **all source folders**, which is not correct.
   
   In addition, the result of SFBQ query in Gradle/java says that sources 
should be always preferred. This is fine in theory, but java uses (exclusively) 
its cached indexed folders instead of the real output folders - so it is able 
to react on editing changes even before they are compiled. But other languages 
behave differently.
   
   These two things in effect lead to spurious "undersolved symbol" when Java 
code references some Groovy or Kotlin class:
   - the `build/groovy/main/classes`, or `build/kotlin/main/classes` is on the 
`classpath/compile` ClassPath; that's right
   - since `preferSources` is true, java support attempts of SFBQ to find 
sources. It gets a result. 
   - And to avoid **parsing**, it replaces the source folder with cache folder, 
under assumption that the sources are indexed into .sig files Java can process.
   
   The last thing is not true for groovy / kotlin, at least now. This could be 
improved in Java support if it did not entirely replace the output folder with 
the source, but used the output folder as a cache for the case the SFBQ result 
folder and its cache does not contain the desired type.
   
   
   ---
   **^Add meaningful description above**
   
   By opening a pull request you confirm that, unless explicitly stated 
otherwise, the changes -
   
    - are all your own work, and you have the right to contribute them.
    - are contributed solely under the terms and conditions of the Apache 
License 2.0 (see section 5 of the license for more information).
   
   Please make sure (eg. `git log`) that all commits have a valid name and 
email address for you in the Author field.
   
   If you're a first time contributor, see the Contributing guidelines for more 
information.
   
   


-- 
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]

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

Reply via email to