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

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

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

Svatopluk Dedic commented on NETBEANS-5468:
-------------------------------------------

Update:

in the above setup, {{ProjectManager.getDefault().findProject(folderF))}} results also differ based on whether {{projectA}} is opened and trusted, or not. This is more tough IMHO, as project's existence should not depend on other projects' UI state.

 

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