Re: LSP Language Server Protocol

2021-10-08 Thread Eric Bresie
I’ve seen the tutorial and appreciated the context, but was curious if more
generalized perspective can be expanded on as this is a specific
implementation.  Some of the following may be implied by the article
indirectly but wanted to confirm it here as well.

It talks about setting up a node.js bash LSP server.  So in general, does
each language need some sort of equivalent LSP Server ?  Or does the
provided LSP in Netbeans work well enough to support other languages?

Assume if a server is not available then one may need to be implemented.
Assume to do this would require compliance with LSP interface of some type
and if so where can this be found?  Is there interface defined in Netbeans
which can be extended or implemented from?

If an server is available how should that be brought in?  Add a dependency
which gets pulled in with maybe some wrapper layer having it?

In what context does the “server” get started up/loaded within Netbeans?
Are there specific triggers to start it (i.e. when working on a specific
file type of the given language, if the language support is “active”, at
startup, or some other trigger)?

I seem to recall in the preference section there is the ability to define
an LSP support.  How does this interact with the new language implemented
here?  In other words, does something have to be defined and added so that
it includes in that area?  Does the user have to manually define that (I
would hope not but maybe initially) and link up the LSP?

How is the grammar (tm) linked up?  Is that supported by the server or does
the server link to the external grammar?  So if there is an “external
implemented server”, does this mean limited or no coverage of the grammar
would have to be considered?

What client interfaces need to be implemented and where are they defined?
Does the client also need knowledge of the grammar in some way?

Assume the “mime-type” may need to be based on standardized ‘mime-types”
for a given language.  Is there a sources to use to get these
“mime-types”?  Can always google but if there is someplace already
established with these to base on that may also help some.


On Thu, Oct 7, 2021 at 1:18 AM Jaroslav Tulach 
wrote:

> >- LSP  seems to be gaining ground, but there
> >are no tutorials, apart from Jan Lahoda's rudimental one
> >.
>
>
> Why do you call the tutorial "rudimental"? The tutorial is short, but it
> contains grammar, syntax coloring, and LSP server. E.g. everything.
> Shouldn't
> you rather call the tutorial "end-to-end" guide for integrating languages
> into
> NetBeans via LSP?
>
> -jt
>
> PS: The only question is why people don't follow the tutorial and create a
> new
> PR with a new language integration per week?
>
>
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
> For additional commands, e-mail: dev-h...@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
> --
Eric Bresie
ebre...@gmail.com


Re: LSP Language Server Protocol

2021-10-08 Thread Eric Bresie
Follow up question…

Assume the LSP is for language editing mainly but how do linking with a
given compiler and/or run type action get handled?

Assume there may be need to handle setting up instances of a given
languages compiler/runtime so where is this setup?

Depending on the language assume there may be need for additional
plug-in/module management support (i.e. node module, Python pips, etc.).
Or would this be in someway some kind of dependency handling functionality
for the language?

If in the past there was an older implementations for a given language, is
it better to start over, to convert over to an LSP based merging code when
possible or just maintain the existing updating to current standards?
Assume this depends on the implemented language but figure I’d add as an
extra step to start porting languages.

On Fri, Oct 8, 2021 at 7:34 AM Eric Bresie  wrote:

> I’ve seen the tutorial and appreciated the context, but was curious if
> more generalized perspective can be expanded on as this is a specific
> implementation.  Some of the following may be implied by the article
> indirectly but wanted to confirm it here as well.
>
> It talks about setting up a node.js bash LSP server.  So in general, does
> each language need some sort of equivalent LSP Server ?  Or does the
> provided LSP in Netbeans work well enough to support other languages?
>
> Assume if a server is not available then one may need to be implemented.
> Assume to do this would require compliance with LSP interface of some type
> and if so where can this be found?  Is there interface defined in Netbeans
> which can be extended or implemented from?
>
> If an server is available how should that be brought in?  Add a dependency
> which gets pulled in with maybe some wrapper layer having it?
>
> In what context does the “server” get started up/loaded within Netbeans?
> Are there specific triggers to start it (i.e. when working on a specific
> file type of the given language, if the language support is “active”, at
> startup, or some other trigger)?
>
> I seem to recall in the preference section there is the ability to define
> an LSP support.  How does this interact with the new language implemented
> here?  In other words, does something have to be defined and added so that
> it includes in that area?  Does the user have to manually define that (I
> would hope not but maybe initially) and link up the LSP?
>
> How is the grammar (tm) linked up?  Is that supported by the server or
> does the server link to the external grammar?  So if there is an “external
> implemented server”, does this mean limited or no coverage of the grammar
> would have to be considered?
>
> What client interfaces need to be implemented and where are they defined?
> Does the client also need knowledge of the grammar in some way?
>
> Assume the “mime-type” may need to be based on standardized ‘mime-types”
> for a given language.  Is there a sources to use to get these
> “mime-types”?  Can always google but if there is someplace already
> established with these to base on that may also help some.
>
>
> On Thu, Oct 7, 2021 at 1:18 AM Jaroslav Tulach 
> wrote:
>
>> >- LSP  seems to be gaining ground, but
>> there
>> >are no tutorials, apart from Jan Lahoda's rudimental one
>> >.
>>
>>
>> Why do you call the tutorial "rudimental"? The tutorial is short, but it
>> contains grammar, syntax coloring, and LSP server. E.g. everything.
>> Shouldn't
>> you rather call the tutorial "end-to-end" guide for integrating languages
>> into
>> NetBeans via LSP?
>>
>> -jt
>>
>> PS: The only question is why people don't follow the tutorial and create
>> a new
>> PR with a new language integration per week?
>>
>>
>>
>>
>> -
>> To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
>> For additional commands, e-mail: dev-h...@netbeans.apache.org
>>
>> For further information about the NetBeans mailing lists, visit:
>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>
>>
>>
>> --
> Eric Bresie
> ebre...@gmail.com
>
-- 
Eric Bresie
ebre...@gmail.com


Getting started

2021-10-08 Thread Karl-Philipp Richter

Hi,
I'd like to see if I could contribute to a few bugs starting with 
investigations with a perspective test-driven bugfix approach.


So far I have the following questions:

1. Module build
What is "etc." in "You can also use php, enterprise, etc. See the 
cluster.properties file." in README? Looking at `clusters.properties` 
webcommon should work, but `ant -Dcluster.config=webcommon` fails due to 
`/mnt/data/home/software/netbeans/nbbuild/build.xml:277: 
${clusters.config.webcommon.list}.dir is not defined`


2. How to run tests?
I'm trying to fix https://issues.apache.org/jira/browse/NETBEANS-5330, a 
StackoverflowError in JsIndexer.java:229 in the 
webcommon/javascript2.editor project.


Looking at the directory structure I see no test where I'd expect it 
judging from the directory structure. If I was sane, I'd give up here 
because adding tests afterwards is very painful.


The FAQ how to run and write tests is broken. I reported that at 
https://issues.apache.org/jira/browse/NETBEANS-6113 where I was asked to 
address the mailing list.


Meanwhile I've been breaking random tests with RuntimeException and 
running different module configurations in order to see whether the test 
fails and figure out which configuration I can use to run a reasonable 
set of tests to finally get started with development, no success so far. 
A full build of the cluster is still running with a few exceptions and 
failing assertions added, but I doubt that's what netbeans devs are 
doing and want their contributors to be doing.


`ant test` which has a too large scope anyway fails due to compilation 
errors in `nbbuild/templates/common.xml:630`.


-Kalle

-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

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





Re: Getting started

2021-10-08 Thread Geertjan Wielenga
Here's all the code:

https://github.com/apache/netbeans

Tests are always found in a standard place per module, e.g.:

https://github.com/apache/netbeans/tree/master/apisupport/apisupport.ant/test/unit

Does that help at all?

Gj

On Fri, Oct 8, 2021 at 3:07 PM Karl-Philipp Richter 
wrote:

> Hi,
> I'd like to see if I could contribute to a few bugs starting with
> investigations with a perspective test-driven bugfix approach.
>
> So far I have the following questions:
>
> 1. Module build
> What is "etc." in "You can also use php, enterprise, etc. See the
> cluster.properties file." in README? Looking at `clusters.properties`
> webcommon should work, but `ant -Dcluster.config=webcommon` fails due to
> `/mnt/data/home/software/netbeans/nbbuild/build.xml:277:
> ${clusters.config.webcommon.list}.dir is not defined`
>
> 2. How to run tests?
> I'm trying to fix https://issues.apache.org/jira/browse/NETBEANS-5330, a
> StackoverflowError in JsIndexer.java:229 in the
> webcommon/javascript2.editor project.
>
> Looking at the directory structure I see no test where I'd expect it
> judging from the directory structure. If I was sane, I'd give up here
> because adding tests afterwards is very painful.
>
> The FAQ how to run and write tests is broken. I reported that at
> https://issues.apache.org/jira/browse/NETBEANS-6113 where I was asked to
> address the mailing list.
>
> Meanwhile I've been breaking random tests with RuntimeException and
> running different module configurations in order to see whether the test
> fails and figure out which configuration I can use to run a reasonable
> set of tests to finally get started with development, no success so far.
> A full build of the cluster is still running with a few exceptions and
> failing assertions added, but I doubt that's what netbeans devs are
> doing and want their contributors to be doing.
>
> `ant test` which has a too large scope anyway fails due to compilation
> errors in `nbbuild/templates/common.xml:630`.
>
> -Kalle
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
> For additional commands, e-mail: dev-h...@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>


Re: Getting started

2021-10-08 Thread Michael Bien

Hi,

once you have build netbeans as described in the readme, you can simply 
run individual tests via right click on the junit file after you opened 
the module in netbeans.


you can also rebuild individual modules or run your netbeans build 
directly from the IDE - you usually don't have to rebuild everything all 
the time, or test everything (tests can take *very* long).


regards,
mbien


On 08.10.21 15:07, Karl-Philipp Richter wrote:

Hi,
I'd like to see if I could contribute to a few bugs starting with 
investigations with a perspective test-driven bugfix approach.


So far I have the following questions:

1. Module build
What is "etc." in "You can also use php, enterprise, etc. See the 
cluster.properties file." in README? Looking at `clusters.properties` 
webcommon should work, but `ant -Dcluster.config=webcommon` fails due 
to `/mnt/data/home/software/netbeans/nbbuild/build.xml:277: 
${clusters.config.webcommon.list}.dir is not defined`


2. How to run tests?
I'm trying to fix https://issues.apache.org/jira/browse/NETBEANS-5330, 
a StackoverflowError in JsIndexer.java:229 in the 
webcommon/javascript2.editor project.


Looking at the directory structure I see no test where I'd expect it 
judging from the directory structure. If I was sane, I'd give up here 
because adding tests afterwards is very painful.


The FAQ how to run and write tests is broken. I reported that at 
https://issues.apache.org/jira/browse/NETBEANS-6113 where I was asked 
to address the mailing list.


Meanwhile I've been breaking random tests with RuntimeException and 
running different module configurations in order to see whether the 
test fails and figure out which configuration I can use to run a 
reasonable set of tests to finally get started with development, no 
success so far. A full build of the cluster is still running with a 
few exceptions and failing assertions added, but I doubt that's what 
netbeans devs are doing and want their contributors to be doing.


`ant test` which has a too large scope anyway fails due to compilation 
errors in `nbbuild/templates/common.xml:630`.


-Kalle

-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

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






-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

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





Re: Getting started

2021-10-08 Thread Karl-Philipp Richter

Hi,
thanks that's helpful for running the exact test I'm developing at the 
moment, however I regularly want to check the whole module for 
unintended changes, so I'm still looking for a way to run more than one 
test and less than all. If I change something in the Javascript editor 
module I want to make sure that I don't break something in another 
class, however I can skip the tests for C++ locally since it's unlikely 
that I break something and there's the CI safeguard which runs them 
anyway. I think that's a common development workflow.


Do you use a mocking framework? I see that a lot of data and references 
are created with utility classes which is a good approach for the test 
cases in integration style. However, I also see cases where mocks would 
be advantageous in terms of clearness and maintainability. There's quite 
a lot of catching exceptions and returning early, so verification is 
also necessary in unit tests (it's rarely the right approach in testing, 
but in these cases it is).


Do you have any measurement, maybe even visualization of coverage?

-Kalle


Am 08.10.21 um 15:27 schrieb Michael Bien:


once you have build netbeans as described in the readme, you can simply 
run individual tests via right click on the junit file after you opened 
the module in netbeans.


you can also rebuild individual modules or run your netbeans build 
directly from the IDE - you usually don't have to rebuild everything all 
the time, or test everything (tests can take *very* long).


-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

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





Re: Getting started

2021-10-08 Thread Michael Bien

On 08.10.21 17:21, Karl-Philipp Richter wrote:

Hi,
thanks that's helpful for running the exact test I'm developing at the 
moment, however I regularly want to check the whole module for 
unintended changes, so I'm still looking for a way to run more than 
one test and less than all. 


testing an entire module should work the same way. right click -> test


If I change something in the Javascript editor module I want to make 
sure that I don't break something in another class, however I can skip 
the tests for C++ locally since it's unlikely that I break something 
and there's the CI safeguard which runs them anyway. I think that's a 
common development workflow.


right. Test the area you are working on. Once you think its ok, create a 
draft PR and the build actions will test everything. Don't abuse the CI, 
since the resources are limited. A full run takes over 2h.


CI is a work in progress judging from recent discussions here.




Do you use a mocking framework?


NetBeans predates even junit, so you will probably find various ways how 
tests are run. A lot of it will be mocked but probably via custom code, 
esp in dusty modules.



I see that a lot of data and references are created with utility 
classes which is a good approach for the test cases in integration 
style. However, I also see cases where mocks would be advantageous in 
terms of clearness and maintainability. There's quite a lot of 
catching exceptions and returning early, so verification is also 
necessary in unit tests (it's rarely the right approach in testing, 
but in these cases it is).


Do you have any measurement, maybe even visualization of coverage?


i don't know, sorry




-Kalle


-michl





Am 08.10.21 um 15:27 schrieb Michael Bien:


once you have build netbeans as described in the readme, you can 
simply run individual tests via right click on the junit file after 
you opened the module in netbeans.


you can also rebuild individual modules or run your netbeans build 
directly from the IDE - you usually don't have to rebuild everything 
all the time, or test everything (tests can take *very* long).




-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

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





[RESULT][VOTE] Release Apache Netbeans Standalone Java Hints Tool 12.5 [vote candidate 1]

2021-10-08 Thread Jan Lahoda
Thanks everyone for checks/reviews and votes!

The vote passes with 3 +1 votes and no 0 or -1 votes:
Matthias Bläsing
Eric Barboni
Jaroslav Tulach

I'll proceed with publishing the release.

Thanks!

Jan

On Wed, Oct 6, 2021 at 2:02 PM Jaroslav Tulach 
wrote:

> +1 (binding)
>
> Downloaded, verified signature and sha and tested the staged
> `tool-12.5.jar` in my project:
> https://github.com/apache/netbeans/pull/3206
> -jt 
>
>
> ne 3. 10. 2021 v 11:13 odesílatel Jan Lahoda  napsal:
>
> > Dear all,
> >
> > I'd like to release the standalone Java Hints tool ("jackpot") based on
> > Apache NetBeans 12.5.
> >
> > The release is here:
> >
> >
> https://dist.apache.org/repos/dist/dev/netbeans/netbeans-jackpot/netbeans-jackpot-12.5-vc1/apache-netbeans-jackpot-12.5.zip
> >
> > Signature file:
> >
> >
> https://dist.apache.org/repos/dist/dev/netbeans/netbeans-jackpot/netbeans-jackpot-12.5-vc1/apache-netbeans-jackpot-12.5.zip.asc
> >
> > SHA512:
> >
> >
> 1ff544f9c24f79e2835c43303d826b6e1fcee700fc14772141adf9302a8a74299ec0c33a29476964323a637572b62619f21453fa6ffcdcee34aac4440103362d
> >  ./apache-netbeans-jackpot-12.5.zip
> >
> > KEYS file:
> >
> > https://dist.apache.org/repos/dist/release/netbeans/KEYS
> >
> > Apache NetBeans Jackpot 3.0 Git Repo tag:
> >
> >
> https://github.com/apache/netbeans-jackpot30/releases/tag/netbeans-jackpot-12.5-vc1
> >
> > Convenience binaries:
> > -built standalone tool:
> >
> >
> https://dist.apache.org/repos/dist/dev/netbeans/netbeans-jackpot/netbeans-jackpot-12.5-vc1/apache-netbeans-jackpot-12.5-bin.zip
> >
> > Its signature file:
> >
> >
> https://dist.apache.org/repos/dist/dev/netbeans/netbeans-jackpot/netbeans-jackpot-12.5-vc1/apache-netbeans-jackpot-12.5-bin.zip.asc
> >
> > and its SHA512:
> >
> >
> 4905d2c044cd0251854046d042586ffb7ea092d09a495a8b605a640e9c4f45d45b7a60026af4a6ef9b26ffe054d676d8768d106d5e62b119ad9f9546f56c9551
> >  ./apache-netbeans-jackpot-12.5-bin.zip
> >
> > -there is also a plugin staging Maven repository here:
> >
> https://repository.apache.org/content/repositories/orgapachenetbeans-1091/
> >
> > This vote is going to be open at least 72 hours, please vote with +1, 0,
> > and -1 as usual.
> >
> > Thanks for any feedback!
> >
> > Jan
> >
>