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

Windows 10 x64/macOS, open spring-boot/wildfly, it will always trigger full build after initialized after imported #793

Closed
yaohaizh opened this issue Feb 12, 2019 · 9 comments · Fixed by #880

Comments

@yaohaizh
Copy link
Collaborator

yaohaizh commented Feb 12, 2019

[provide a description of the issue]

Environment
  • Version: 1.31.0 (user setup)
  • Commit: 7c66f58312b48ed8ca4e387ebd9ffe9605332caa
  • Date: 2019-02-05T22:35:56.624Z
  • Electron: 3.1.2
  • Chrome: 66.0.3359.181
  • Node.js: 10.2.0
  • V8: 6.6.346.32
  • OS: Windows_NT x64 10.0.17763
Steps To Reproduce
  1. Clone https://github.com/spring-projects/spring-boot or https://github.com/wildfly/wildfly
  2. Open the repo in vscode
  3. Close the repo after the first-time initialization is done(full built is done for the first time)
  4. Reopen the repo in vscode
Current Result

A full build will be triggered after some times

Expected Result

No full build should be triggered since there is no change made on the contents

Additional Informations

The issue only exists on the Windows platform, but not macOS, Linux
Might also exists for small/medium size projects, but it takes less time to do the building.

@snjeza
Copy link
Contributor

snjeza commented Apr 11, 2019

@yaohaizh
Copy link
Collaborator Author

@snjeza With this change, the issue was fixed.

@fbricon
Copy link
Collaborator

fbricon commented Apr 12, 2019

Is this a problem with the current release or with the extension from the master branch?

@snjeza
Copy link
Contributor

snjeza commented Apr 12, 2019

The problem exists in all the version of vscode-java.

@yaohaizh yaohaizh changed the title Windows 10 x64, open spring-boot/wildfly, it will always trigger full build after initialized after imported Windows 10 x64/macOS, open spring-boot/wildfly, it will always trigger full build after initialized after imported Apr 14, 2019
@yaohaizh
Copy link
Collaborator Author

And on all platform, but not Windows specifically.

@apupier
Copy link
Member

apupier commented Apr 1, 2021

@yaohaizh said:

@snjeza With this change, the issue was fixed.

but there was more comments afterwise.
Someone know if it is fixed or not? Or have Windows to try it?

@snjeza
Copy link
Contributor

snjeza commented Nov 30, 2021

@fbricon @rgrunber @testforstephen @yaohaizh @jdneo could you try https://github.com/snjeza/vscode-test/raw/master/java-1.2.1.vsix
You have to set the following properties:

"java.jdt.ls.vmargs": "-DwatchParentProcess=10 <YOUR_VMARGS>",

"java.import.generatesMetadataFilesAtProjectRoot": true,

Test case - #2233 (comment)

@jdneo
Copy link
Collaborator

jdneo commented Nov 30, 2021

Is there any reason that java.import.generatesMetadataFilesAtProjectRoot has to be set to true?

@snjeza
Copy link
Contributor

snjeza commented Nov 30, 2021

@is there any reason that java.import.generatesMetadataFilesAtProjectRoot has to be set to true?

I have faced the following exception:

!ENTRY org.eclipse.buildship.core 4 0 2021-11-29 23:41:37.785
!MESSAGE Could not read persisted classpath for project spring-boot-test-support.
!STACK 0
org.xml.sax.SAXParseException; lineNumber: 81; columnNumber: 4; The element type "attributes" must be terminated by the matching end-tag "</attributes>".
        at java.xml/com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:261)
        at java.xml/com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
        at org.eclipse.buildship.core.internal.preferences.ClasspathConverter.readClasspathNode(ClasspathConverter.java:76)
        at org.eclipse.buildship.core.internal.preferences.ClasspathConverter.toEntries(ClasspathConverter.java:66)
        at org.eclipse.buildship.core.internal.preferences.ClasspathConverter.toEntries(ClasspathConverter.java:115)
        at org.eclipse.buildship.core.internal.preferences.PersistentModelConverter$13.apply(PersistentModelConverter.java:154)
        at org.eclipse.buildship.core.internal.preferences.PersistentModelConverter$13.apply(PersistentModelConverter.java:149)
        at org.eclipse.buildship.core.internal.preferences.PersistentModelConverter.loadValue(PersistentModelConverter.java:207)
        at org.eclipse.buildship.core.internal.preferences.PersistentModelConverter.toModel(PersistentModelConverter.java:149)
        at org.eclipse.buildship.core.internal.preferences.DefaultModelPersistence.doLoadModel(DefaultModelPersistence.java:127)
        at org.eclipse.buildship.core.internal.preferences.DefaultModelPersistence.access$000(DefaultModelPersistence.java:51)
        at org.eclipse.buildship.core.internal.preferences.DefaultModelPersistence$1.load(DefaultModelPersistence.java:60)
        at org.eclipse.buildship.core.internal.preferences.DefaultModelPersistence$1.load(DefaultModelPersistence.java:56)
        at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3529)
        at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2278)
        at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2155)
        at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2045)
        at com.google.common.cache.LocalCache.get(LocalCache.java:3951)
        at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974)
        at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4935)
        at org.eclipse.buildship.core.internal.preferences.DefaultModelPersistence$2.run(DefaultModelPersistence.java:190)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

I can't reproduce it again. You can test with and without generatesMetadataFilesAtProjectRoot:true

@testforstephen testforstephen added this to the End October milestone Oct 27, 2022
rgrunber added a commit that referenced this issue Oct 27, 2022
- Reference #793 in the entries

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment