Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements to incremental compilation of NetBeans #4523

Merged
merged 5 commits into from
Jul 12, 2023

Conversation

jtulach
Copy link
Contributor

@jtulach jtulach commented Aug 21, 2022

After few months I tried following on my repository

$ git pull 
$ ant build

and run into bunch of compilation errors. These are the changes I had to make to let the incremental build pass. Without these changes I am getting errors like:

 [nb-javac] Compiling 5 source files to /platform/sampler/build/classes
 [nb-javac] Ignoring source, target and bootclasspath as release has been set
 [nb-javac] warning: A file for type 'org.netbeans.modules.sampler.Bundle' already exists on the sourcepath or classpath
 [nb-javac] error: warnings found and -Werror specified
 [nb-javac] 1 error
 [nb-javac] 1 warning

@jtulach jtulach added this to the NB16 milestone Aug 21, 2022
@jtulach jtulach self-assigned this Aug 21, 2022
Copy link
Contributor

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw the problems regarding the annotation processors also in the past, but as I commonly build after running a clean (git clean -f -x -d) I put it of to investigate. Thank you.

Can you describe the requirement for adding the build-prerequisite entries in the c.jcraft.jsch module? The module itself only repackages jsch as an OSGI module. According to the documentation compile-dependency implied build-prerequisite:

@jtulach
Copy link
Contributor Author

jtulach commented Aug 21, 2022

Can you describe the requirement for adding the build-prerequisite entries in the c.jcraft.jsch module?
The module itself only repackages jsch as an OSGI module. According to the documentation compile-dependency implied

I got a failure that c.jcraft.jsch module cannot be compiled as it requires some other module in a version x.y, but only older a.b version was found. Requiring the build order fixes that problem. Maybe removing <compile-dependency/> would fix the problem as well, if there is no code to compile.

@matthiasblaesing
Copy link
Contributor

I tried to see the problem myself and indeed it is reproducible with:

git clean -f -x -d
git checkout 5573b9c9e8794ba43374347606509a5a4206a00a^
ant
git checkout 5573b9c9e8794ba43374347606509a5a4206a00a
ant

From my perspective this is not an issue in the module, but in the build-system. A module declares a versioned dependency and the build system (according to this test) the module to be present for this (although only the minimal runtime version is declared) and the build system does not ensure the module is build - this is broken.

Anyway. For the concrete case the minimal fix is adding <build-prerequisite /> is enough.

I'm not sure, though that it is a good idea to do this, as next time the problem is a different module.

@sdedic
Copy link
Member

sdedic commented Aug 27, 2022

I'm not sure, though that it is a good idea to do this, as next time the problem is a different module.

Let's do the minimal fix now, and talk/fix buildsystem as the next step (another PR)

@neilcsmith-net neilcsmith-net modified the milestones: NB16, NB17 Oct 19, 2022
@mbien
Copy link
Member

mbien commented Jan 14, 2023

conflicts would need to be resolved here to get this into NB17

@neilcsmith-net neilcsmith-net modified the milestones: NB17, NB18 Jan 18, 2023
@neilcsmith-net neilcsmith-net modified the milestones: NB18, NB19 Apr 18, 2023
@sdedic
Copy link
Member

sdedic commented May 12, 2023

@jtulach - still relevant ?

@jtulach jtulach added the nb-javac Run nb-javac integration tests label Jul 9, 2023
@jtulach
Copy link
Contributor Author

jtulach commented Jul 9, 2023

I tried to see the problem myself and indeed it is reproducible with:

+1

Anyway. For the concrete case the minimal fix is adding <build-prerequisite /> is enough.

+1

I'm not sure, though that it is a good idea to do this,

I see adding <build-prerequisite> as a proper fix. It says (in my opinion) "make sure that module is properly compiled". Which it is not, if it is outdated.

as next time the problem is a different module.

Probably. This kind of incremental issues is hard to spot and get completely right.

@jtulach jtulach merged commit aedaefe into apache:master Jul 12, 2023
34 checks passed
@matthiasblaesing
Copy link
Contributor

matthiasblaesing commented Jul 12, 2023

Please don't use the github "squash+merge" option if you user is not appropriately setup. The author of the resulting commit is:

Jaroslav Tulach <1842422+jtulach@users.noreply.github.com>

This is not correct. The author email is obviously invalid. We saw this multiple times now, the github UI is useless for squashing as it destroys information.

@neilcsmith-net
Copy link
Member

@matthiasblaesing @mbien can we just merge #5617 and remove the option from the UI!

@matthiasblaesing
Copy link
Contributor

#5617 is already added my +1 on that PR, so sure ;-)

@mbien
Copy link
Member

mbien commented Jul 12, 2023

@matthiasblaesing @mbien can we just merge #5617 and remove the option from the UI!

fine I merge it :)

I just had the worry that this might encourage merges without any kind of squashing. Lets see if it improves the situation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nb-javac Run nb-javac integration tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants