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

Order classes by recent failures and modification date when feeding them to javac compiler #14332

Open
vlsi opened this issue Aug 30, 2020 · 2 comments
Labels

Comments

@vlsi
Copy link
Contributor

vlsi commented Aug 30, 2020

Expected Behavior

Repeated compileJava should provide fast turnaround.
For instance, if compilation fails, and user edits a file, then Gradle should feed the problematic file first to the compiler, so user sees earlier if the error is fixed or not.

At the same time, if some of the files were modified, it makes sense to schedule them first for the compilation so the user sees if the changed files compile at all.

So it would be nice to have the following order:

  1. Order files with known failures during previous compilation
  2. Then order by modification date (most recently modified files should go first)

Current Behavior

Gradle schedules files in unknown order, and it might take significant time for the first error from javac to appear.

Context

javac might take significant time, especially when formal verification tools like https://checkerframework.org/ or https://github.com/google/error-prone are used.

I just checked with Java 11 on the command line, and it seems to work:

$ javac A.java B.java
A.java:1: error: class Aa is public, should be declared in a file named Aa.java
public class Aa {
       ^
B.java:1: error: class Bb is public, should be declared in a file named Bb.java
public class Bb {}
       ^
2 errors
$ javac B.java A.java
B.java:1: error: class Bb is public, should be declared in a file named Bb.java
public class Bb {}
       ^
A.java:1: error: class Aa is public, should be declared in a file named Aa.java
public class Aa {
       ^
2 errors
@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you're interested in how we try to keep the backlog in a healthy state, please read our blog post on how we refine our backlog. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution.

@stale stale bot added the stale label Apr 16, 2022
@vlsi
Copy link
Contributor Author

vlsi commented Apr 16, 2022

The issue is still relevant

@stale stale bot removed the stale label Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants