You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Laszlo Kishalmi (Jira)" <ji...@apache.org> on 2021/03/18 16:45:00 UTC

[jira] [Commented] (NETBEANS-5468) Gradle parent / containment queries inconsistent

    [ https://issues.apache.org/jira/browse/NETBEANS-5468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17304273#comment-17304273 ] 

Laszlo Kishalmi commented on NETBEANS-5468:
-------------------------------------------

I'd say improved, by having the project structure avaliable early, of course that could happen if the project is trusted.

As the parentship depends on how the project actually icluded into the root project. It could be:

include ':subprojectC'

project(':sibprojectC').projectDir = "$rootDir/foderF/subprojectC"

or

include ":folderF:subprojectC"

 

In these cases subprojectC has two different parents, one is a projecF (for foldrF), the other case is projectA

> Gradle parent / containment queries inconsistent
> ------------------------------------------------
>
>                 Key: NETBEANS-5468
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-5468
>             Project: NetBeans
>          Issue Type: Improvement
>          Components: projects - Gradle Java EE
>            Reporter: Svatopluk Dedic
>            Assignee: Laszlo Kishalmi
>            Priority: Major
>
> There are queries that power {{ProjectUtils.rootOf}}, {{parentOf}} and {{containedSubprojects}}. Their behaviour is largely inconsistent of the root project is not opened.
>  * subproject B that resides in a direct child of root project A reports A as parent
>  * but A does not report B as subproject, unless A opens and is trusted
> Project API in general requires that project services does not depend on the project being opened in the UI, so this is rather a bug. Given that gradle is virtually unable to statically determine project contents or hierarchy, it could be clarified in {{ParentProjectProvider}} etc Javadocs that the behaviour of unopened project may be reduced, i.e. parent known, but subprojects unknown, or something like that. Also it should be documented how to programmatically get the system 'into good shape' when the API user wants to inspect the hierarchy.
> Maybethe effect of trust and 'opennes' on queries could be discussed also with [~jtulach] on dev mailing list.
> Other bug is that if I have
>  * root project A
>  ** folder F
>  *** subproject C
> such as there's {{include :folder:C}} in {{settings.gradle}}, then even {{ProjectUtils.parentOf(c)}} returns null - again unless A is opened in the UI. This is most probably a bug, since at the same time {{ProjectUtils.rootOf(c)}} yields A.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

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