You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "jtulach (via GitHub)" <gi...@apache.org> on 2024/01/28 19:58:24 UTC

[PR] Support multi line texts in suite.py [netbeans]

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

   I cannot open [graal/sdk](https://github.com/oracle/graal/tree/2ae0f674a8294da90eb1c2398aa70c8c1c986c74/sdk) project anymore. Turns out that now its [suite.py is using multiline texts](https://github.com/oracle/graal/blame/2ae0f674a8294da90eb1c2398aa70c8c1c986c74/sdk/mx.sdk/suite.py#L1139) and the conversion of `suite.py` to JSON fails to convert that properly. This PR provides a text and a fix to handle such conversion properly. With the fix I am able to open `sdk` as well as `truffle` project without errors.
   
   CCing @rschatz, @gilles-duboscq
   
   


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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


Re: [PR] Support multi line texts in suite.py & NbLaunchDelegate fix [netbeans]

Posted by "jtulach (via GitHub)" <gi...@apache.org>.
jtulach commented on code in PR #7011:
URL: https://github.com/apache/netbeans/pull/7011#discussion_r1471487947


##########
java/java.lsp.server/test/unit/src/org/netbeans/modules/java/lsp/server/debugging/launch/NbLaunchDelegateTest.java:
##########
@@ -0,0 +1,132 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.netbeans.modules.java.lsp.server.debugging.launch;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Map;
+import java.util.concurrent.CompletableFuture;
+import java.util.function.Consumer;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import static org.junit.Assert.*;
+import org.netbeans.api.project.Project;
+import org.netbeans.api.project.ProjectManager;
+import org.netbeans.modules.java.lsp.server.debugging.DebugAdapterContext;
+import org.netbeans.spi.project.ActionProvider;
+import org.netbeans.spi.project.ProjectFactory;
+import org.netbeans.spi.project.ProjectState;
+import org.netbeans.spi.project.SingleMethod;
+import org.openide.filesystems.FileObject;
+import org.openide.filesystems.FileUtil;
+import org.openide.loaders.DataObject;
+import org.openide.util.Lookup;
+import org.openide.util.Pair;
+import org.openide.util.lookup.Lookups;
+import org.openide.util.lookup.ServiceProvider;
+
+public class NbLaunchDelegateTest {
+
+    public NbLaunchDelegateTest() {
+    }
+
+    @Test
+    public void testFileObjectsLookup() throws Exception {
+        FileObject fo = FileUtil.createMemoryFileSystem().getRoot().createData("test.txt");
+        Lookup lkp = NbLaunchDelegate.createTargetLookup(null, null, fo);
+        assertEquals(fo, lkp.lookup(FileObject.class));
+
+        DataObject obj = lkp.lookup(DataObject.class);
+        assertNotNull("DataObject also found", obj);

Review Comment:
   While writing my Enso code, I was surprised I cannot find `EnsoDataObject` in the lookup. 8838cffbeeb762e54f4a107ab9f50a01acfbd66a fixes that.



-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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


Re: [PR] `NbLaunchDelegate` fix and test multi line texts in suite.py [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #7011:
URL: https://github.com/apache/netbeans/pull/7011#issuecomment-1941172984

   this page on the wiki is explaining a bit how the CI pipeline works:
   https://cwiki.apache.org/confluence/display/NETBEANS/PRs+and+You+-+A+reviewer+Guide
   the "Important" section mentions some details how the labels are taken into account and when the workflow sees changes.
   
   I think this PR might have been fine if CI would have finished running after the second sync. There is actually an option to enforce "green checks" before gh allows the merge. But last time when we considered to enable that, there were concerns that this could lock us out as far as I remember. (although I think there would be enough tricks left to get around that lockout and unblock it again)


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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


Re: [PR] `NbLaunchDelegate` fix and test multi line texts in suite.py [netbeans]

Posted by "jtulach (via GitHub)" <gi...@apache.org>.
jtulach merged PR #7011:
URL: https://github.com/apache/netbeans/pull/7011


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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


Re: [PR] Support multi line texts in suite.py & NbLaunchDelegate fix [netbeans]

Posted by "jtulach (via GitHub)" <gi...@apache.org>.
jtulach commented on code in PR #7011:
URL: https://github.com/apache/netbeans/pull/7011#discussion_r1471487947


##########
java/java.lsp.server/test/unit/src/org/netbeans/modules/java/lsp/server/debugging/launch/NbLaunchDelegateTest.java:
##########
@@ -0,0 +1,132 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.netbeans.modules.java.lsp.server.debugging.launch;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Map;
+import java.util.concurrent.CompletableFuture;
+import java.util.function.Consumer;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import static org.junit.Assert.*;
+import org.netbeans.api.project.Project;
+import org.netbeans.api.project.ProjectManager;
+import org.netbeans.modules.java.lsp.server.debugging.DebugAdapterContext;
+import org.netbeans.spi.project.ActionProvider;
+import org.netbeans.spi.project.ProjectFactory;
+import org.netbeans.spi.project.ProjectState;
+import org.netbeans.spi.project.SingleMethod;
+import org.openide.filesystems.FileObject;
+import org.openide.filesystems.FileUtil;
+import org.openide.loaders.DataObject;
+import org.openide.util.Lookup;
+import org.openide.util.Pair;
+import org.openide.util.lookup.Lookups;
+import org.openide.util.lookup.ServiceProvider;
+
+public class NbLaunchDelegateTest {
+
+    public NbLaunchDelegateTest() {
+    }
+
+    @Test
+    public void testFileObjectsLookup() throws Exception {
+        FileObject fo = FileUtil.createMemoryFileSystem().getRoot().createData("test.txt");
+        Lookup lkp = NbLaunchDelegate.createTargetLookup(null, null, fo);
+        assertEquals(fo, lkp.lookup(FileObject.class));
+
+        DataObject obj = lkp.lookup(DataObject.class);
+        assertNotNull("DataObject also found", obj);

Review Comment:
   While [writing my Enso code](https://github.com/enso-org/enso/pull/8923/files#r1473879609), I was surprised I cannot find `EnsoDataObject` in the lookup. 8838cffbeeb762e54f4a107ab9f50a01acfbd66a fixes that.



-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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


Re: [PR] Support multi line texts in suite.py & NbLaunchDelegate fix [netbeans]

Posted by "jtulach (via GitHub)" <gi...@apache.org>.
jtulach commented on code in PR #7011:
URL: https://github.com/apache/netbeans/pull/7011#discussion_r1471487947


##########
java/java.lsp.server/test/unit/src/org/netbeans/modules/java/lsp/server/debugging/launch/NbLaunchDelegateTest.java:
##########
@@ -0,0 +1,132 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.netbeans.modules.java.lsp.server.debugging.launch;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Map;
+import java.util.concurrent.CompletableFuture;
+import java.util.function.Consumer;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import static org.junit.Assert.*;
+import org.netbeans.api.project.Project;
+import org.netbeans.api.project.ProjectManager;
+import org.netbeans.modules.java.lsp.server.debugging.DebugAdapterContext;
+import org.netbeans.spi.project.ActionProvider;
+import org.netbeans.spi.project.ProjectFactory;
+import org.netbeans.spi.project.ProjectState;
+import org.netbeans.spi.project.SingleMethod;
+import org.openide.filesystems.FileObject;
+import org.openide.filesystems.FileUtil;
+import org.openide.loaders.DataObject;
+import org.openide.util.Lookup;
+import org.openide.util.Pair;
+import org.openide.util.lookup.Lookups;
+import org.openide.util.lookup.ServiceProvider;
+
+public class NbLaunchDelegateTest {
+
+    public NbLaunchDelegateTest() {
+    }
+
+    @Test
+    public void testFileObjectsLookup() throws Exception {
+        FileObject fo = FileUtil.createMemoryFileSystem().getRoot().createData("test.txt");
+        Lookup lkp = NbLaunchDelegate.createTargetLookup(null, null, fo);
+        assertEquals(fo, lkp.lookup(FileObject.class));
+
+        DataObject obj = lkp.lookup(DataObject.class);
+        assertNotNull("DataObject also found", obj);

Review Comment:
   While writing my Enso code, I was surprised I cannot find `EnsoDataObject` in the lookup. 957424b415ecbe5e0090d2cb5bf277560847330fb40669830f89008696332dde fixes that.



-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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


Re: [PR] `NbLaunchDelegate` fix and test multi line texts in suite.py [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #7011:
URL: https://github.com/apache/netbeans/pull/7011#issuecomment-1937870664

   This change is currently breaking master.
   
   Looking at the timestamps this PR was merged without waiting for CI to complete. Please check if this can be fixed.
   
   https://github.com/apache/netbeans/actions/runs/7864172928 PR run
   https://github.com/apache/netbeans/actions/runs/7864179478 master run


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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


Re: [PR] `NbLaunchDelegate` fix and test multi line texts in suite.py [netbeans]

Posted by "jtulach (via GitHub)" <gi...@apache.org>.
jtulach commented on PR #7011:
URL: https://github.com/apache/netbeans/pull/7011#issuecomment-1941100164

   > This change is currently breaking master.
   
   Ops. Sorry for the mistake.
   
   > Looking at the timestamps this PR was merged without waiting for CI to complete. Please check if this can be fixed.
   
   I guess I got confused with CI & labels. Everything was green, 
   
   ![Uploading image.png…]()
   
   but I probably used labels incorrectly. I'll do my best to be more careful next time.
   


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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


Re: [PR] `NbLaunchDelegate` fix and test multi line texts in suite.py [netbeans]

Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on PR #7011:
URL: https://github.com/apache/netbeans/pull/7011#issuecomment-1941136969

   Thanks for merging the revert @jtulach 
   
   Two things to be aware : 
   
   1. When you force pushed to this it started a new set of tests based on the labels that had been set.  These had not completed when this was merged.
   2. Adding labels by itself does not trigger tests to run again, unfortunately. Pushing to a PR does.  And the "hidden" switch to rerun tests with new labels is to lock and unlock conversation (in case you're wondering about why I did this on #7059 )  


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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


Re: [PR] `NbLaunchDelegate` fix and test multi line texts in suite.py [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #7011:
URL: https://github.com/apache/netbeans/pull/7011#issuecomment-1937444436

   this looks like it needs the https://github.com/apache/netbeans/labels/LSP and https://github.com/apache/netbeans/labels/MX tests?


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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