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

Check for updated snapshot repositories when running build. #3889

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

rgrunber
Copy link
Member

@rgrunber rgrunber commented Dec 9, 2024

  • Tycho p2 repositories whose underlying content is updated are considered snapshot repositories, and locally cached data can become stale and lead to cryptic compilation errors

https://github.com/eclipse-jdtls/eclipse.jdt.ls/blob/64cc830f5444c7245c01c041d031b431eca72c0e/org.eclipse.jdt.ls.target/org.eclipse.jdt.ls.tp.target#L31
https://github.com/eclipse-jdtls/eclipse.jdt.ls/blob/64cc830f5444c7245c01c041d031b431eca72c0e/org.eclipse.jdt.ls.target/org.eclipse.jdt.ls.tp.target#L38

The content there can get cached in a developer's local area and continue to pull that stale content. I'm not sure if version bumps "reset" things and cause the latest to be pulled but I definitely ran into an issue recently where I could see a jdt.core bundle from November 5th, while everything else was from early December, resulting in things like :

!ENTRY org.eclipse.jdt.core.manipulation 4 0 2024-12-09 10:58:18.928
!MESSAGE Error in JDT Core during AST creation
!STACK 0
java.lang.NoSuchMethodError: 'boolean org.eclipse.jdt.internal.compiler.ast.ImportReference.isImplicit()'
	at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:1545)
	at org.eclipse.jdt.core.dom.CompilationUnitResolver.convert(CompilationUnitResolver.java:380)
	at org.eclipse.jdt.core.dom.CompilationUnitResolver.toCompilationUnit(CompilationUnitResolver.java:1483)
	at org.eclipse.jdt.core.dom.CompilationUnitResolver$ECJCompilationUnitResolver.toCompilationUnit(CompilationUnitResolver.java:106)
	at org.eclipse.jdt.core.dom.ASTParser.internalCreateASTCached(ASTParser.java:1299)
	at org.eclipse.jdt.core.dom.ASTParser.lambda$1(ASTParser.java:1178)
	at org.eclipse.jdt.internal.core.JavaModelManager.cacheZipFiles(JavaModelManager.java:5692)
	at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:1178)
	at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:918)
	at org.eclipse.jdt.core.manipulation.CoreASTProvider$1.run(CoreASTProvider.java:294)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.jdt.core.manipulation.CoreASTProvider.createAST(CoreASTProvider.java:286)
	at org.eclipse.jdt.core.manipulation.CoreASTProvider.getAST(CoreASTProvider.java:199)
	at org.eclipse.jdt.ls.core.internal.handlers.DocumentHighlightHandler.documentHighlight(DocumentHighlightHandler.java:56)
	at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$12(JDTLanguageServer.java:731)
	at org.eclipse.jdt.ls.core.internal.BaseJDTLanguageServer.lambda$0(BaseJDTLanguageServer.java:87)

- Tycho p2 repositories whose underlying content is updated are
  considered snapshot repositories, and locally cached data can become
  stale and lead to cryptic compilation errors

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
@rgrunber rgrunber added this to the Mid December 2024 milestone Dec 9, 2024
@rgrunber rgrunber merged commit eb145da into redhat-developer:master Dec 9, 2024
2 checks passed
@rgrunber rgrunber deleted the mvn-update-snapshots branch December 9, 2024 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant