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

Buid I20231208-1800 is unstable #1653

Closed
iloveeclipse opened this issue Dec 9, 2023 · 18 comments
Closed

Buid I20231208-1800 is unstable #1653

iloveeclipse opened this issue Dec 9, 2023 · 18 comments
Labels
bug Something isn't working regression Regression defect

Comments

@iloveeclipse
Copy link
Member

See

Looks like most bundles from the platform repository were affected.

I assume this is caused by eclipse-platform/eclipse.platform#965 that changed build settings for compilation with maven.

The most intriguing question is: which settings were used before???

I will check that later.

@iloveeclipse iloveeclipse added bug Something isn't working regression Regression defect labels Dec 9, 2023
@iloveeclipse
Copy link
Member Author

which settings were used before???

@laeubi : I would be interested in your opinion regarding this question. Is that maven/tycho/ecj who defines defaults if nothing is specified? Or do we have some default "profile" or whatever that is used in such case?

@laeubi
Copy link
Contributor

laeubi commented Dec 9, 2023

First, ecj defaults are used (not sure where these are defined) then compiler args are used (e.g.

<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho.version}</version>
<dependencies>
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>ecj</artifactId>
<version>${cbi-ecj-version}</version>
</dependency>
</dependencies>
<configuration>
<compilerArgs>
<args>${code.ignoredWarnings}</args>
<args>-verbose</args>
<args>-inlineJSR</args>
<args>-enableJavadoc</args>
<args>-encoding</args>
<args>${project.build.sourceEncoding}</args>
<args>-proceedOnError</args>
<!-- Use this form, for Tycho 22 or less.
<args>-log</args>
<args>${project.build.directory}/@dot.xml</args>
-->
</compilerArgs>
<!-- Use this form for Tycho 23 or greater -->
<log>xml</log>
<logDirectory>${project.build.directory}/compilelogs</logDirectory>
<showWarnings>true</showWarnings>
<excludeResources>
<exclude>**/package.html</exclude>
</excludeResources>
<useProjectSettings>false</useProjectSettings>
</configuration>
</plugin>
), what then now is overridden here to use the project specific settings file, see https://tycho.eclipseprojects.io/doc/latest/tycho-compiler-plugin/compile-mojo.html#useProjectSettings if file ${project.basedir}/.settings/org.eclipse.jdt.core.prefs can be found by tycho.

@HannesWell
Copy link
Member

@iloveeclipse is it correct that unstable builds are not added to the i-builds composite and therefore I cannot use the methods added in eclipse-equinox/equinox#424 in eclipse-platform/eclipse.platform#972?

@iloveeclipse
Copy link
Member Author

Exact. Until we have a stable build we can't move forward. Makes sense.

@iloveeclipse
Copy link
Member Author

Ome can revert eclipse-platform/eclipse.platform#965 as a quick fix.

@HannesWell
Copy link
Member

Exact. Until we have a stable build we can't move forward. Makes sense.

Absolutely. Just wanted to confirm it. :)

Ome can revert eclipse-platform/eclipse.platform#965 as a quick fix.

Yes. I although I wonder what can be configured in the settings that only changes the generated byte-code?

Looking for example at
https://github.com/eclipse-platform/eclipse.platform/blob/a5789fbe6b8787def560cc10ed086c50f3662980/runtime/bundles/org.eclipse.core.jobs/.settings/org.eclipse.jdt.core.prefs#L12-L15

I would say it is probably on of

`inlineJsrBytecode=enabled`
`methodParameters=do not generate`
`codegen.unusedLocal=preserve`

@akurtakov
Copy link
Member

unusedLocal=preserve looks wrong to me and my gut feeling is that this is the reason why POP is replaced by ASTORE

@iloveeclipse
Copy link
Member Author

I haven't investigated this deeper, so no proposal from my side here.

@HannesWell
Copy link
Member

Looking at the build logs of a PR from eclipse.platform I see so it is reproducible (but doesn't fail the build)

10:22:25.107 [WARNING] MavenProject: org.eclipse.platform:org.eclipse.core.jobs:3.15.200-SNAPSHOT @ /home/jenkins/agent/workspace/eclipse.platform_PR-971/runtime/bundles/org.eclipse.core.jobs/.polyglot.META-INF: baseline and build artifacts have same version but different contents
   no-classifier: different
      org/eclipse/core/internal/jobs/ImplicitJobs.class: different
      org/eclipse/core/internal/jobs/InternalWorker.class: different
      org/eclipse/core/internal/jobs/JobListeners.class: different
      org/eclipse/core/internal/jobs/JobManager.class: different
      org/eclipse/core/internal/jobs/LockManager$LockState.class: different
      org/eclipse/core/internal/jobs/LockManager.class: different
      org/eclipse/core/internal/jobs/OrderedLock.class: different
      org/eclipse/core/internal/jobs/ThreadJob.class: different
      org/eclipse/core/internal/jobs/Worker.class: different
      org/eclipse/core/internal/jobs/WorkerPool.class: different

I'll try out a few options and check the results in a PR.
In general we could consider to fail the build in such cases by setting -Dtycho.p2.baselineMode to a corresponding value.

HannesWell added a commit to HannesWell/eclipse.platform that referenced this issue Dec 10, 2023
@akurtakov
Copy link
Member

What is the status here? If there is no fix in the next couple of hours I'll partially revert the patch causing it to not change compiler options.

@HannesWell
Copy link
Member

I cannot help on this issue any more before this evening.
For me there is some input/knowledge missing at the moment.
But since a soonish resultion is desired anybody else has to take action based on what has been said already.

@akurtakov
Copy link
Member

We can not afford continuing without a build - that's for sure. Improving/changing/etc. is always welcome and should come when this missing input/knowledge is gathered and the changes are better needed and executed in more integral way.

@jukzi
Copy link
Contributor

jukzi commented Dec 11, 2023

good morning, ill take a look now

@jukzi
Copy link
Contributor

jukzi commented Dec 11, 2023

The only "codgen" options that ecj changes in "org.eclipse.jdt.internal.compiler.batch.Main.initializeWarnings(String)" (when using parameter -properties {file}) seems to be org.eclipse.jdt.core.compiler.codegen.unusedLocal.
As far as i understand the unusedLocal is by default "optimize out" when not parameter is given but defaults to "preserve" when jdt UI or ecjs -properties is used

@srikanth-sankaran
Copy link

unusedLocal=preserve looks wrong to me and my gut feeling is that this is the reason why POP is replaced by ASTORE

See eclipse-platform/eclipse.platform#973 (comment)

@iloveeclipse
Copy link
Member Author

@iloveeclipse iloveeclipse reopened this Dec 11, 2023
@iloveeclipse
Copy link
Member Author

OK, I see Alex created #1655 for that.

@akurtakov
Copy link
Member

I have opened #1655 as it's api_description file this time so most likely different issue.

Michael5601 pushed a commit to CodeLtDave/eclipse.platform that referenced this issue Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working regression Regression defect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants