Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,23 @@ on:
workflow_dispatch: {}

jobs:
validate:
name: Validation steps
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
check_together: 'yes'
scandir: './scripts'

- name: Validate codecov.yml
shell: bash
run: curl -vvv --fail --data-binary @- https://codecov.io/validate < codecov.yml

build:
name: Build on JDK ${{ matrix.java-version }} (${{ matrix.os-name }})
runs-on: ${{ matrix.os-name }}
Expand All @@ -20,7 +37,6 @@ jobs:
matrix:
os-name: [ubuntu-latest]
java-version:
- 11 # LTS
- 17 # LTS
- 21 # LTS
- GA # General access
Expand All @@ -29,6 +45,7 @@ jobs:
java-version: GA
- os-name: macos-latest
java-version: GA

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
53 changes: 0 additions & 53 deletions .github/workflows/codeql.yml

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: zulu
# Must use >= JDK 17 for Javadocs to generate correctly
java-version: 23
server-id: ossrh
server-username: OSSRH_USERNAME
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- main
- v5

jobs:
submit-dependency-snapshot:
Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/validate.yml

This file was deleted.

104 changes: 35 additions & 69 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,56 +1,34 @@
# Contribution guidelines and info

Hi! Thanks for taking an interest in this project!
If you would like to contribute, then help is always
welcome however big or small!
Hi! Thanks for taking an interest in this project! If you would like to contribute, then help is
always welcome however big or small!

## Finding something to contribute

If you are new and would like to pick something up,
check the issues tab to see if anything is of interest.
If you want further clarification, feel free to drop a
comment.
If you are new and would like to pick something up, check the issues tab to see if anything is of
interest. If you want further clarification, feel free to drop a comment.

> [!TIP]
> You could alternatively add a message on the discussions
> tab!

Contributions do not necessarily need to be code changes
either. You can also contribute by:
Contributions do not necessarily need to be code changes either. You can also contribute by:

- Testing this project out for yourself and discussing any
feedback on the discussions page.
- Testing this project out for yourself and discussing any feedback on the discussions page.
- Fixing and improving documentation.
- Contributing new Wiki pages.
- Raising bugs in the issue tab.

## Raising issues

If raising an issue, please make sure that you include
some details such as:

- The problem in a short description.
- What do you expect to happen?
- What actually happens?
- How did you reproduce this (if applicable)?
- What JDK you are using
- What OS you are using

If these are not relevant to you, then they can be
ignored.

## Getting help

Please make a discussion in the discussions tab rather
than opening a new issue if you need help with using this library.
Please make a discussion in the discussions tab rather than opening a new issue if you need help
with using this library.

## Contributing changes to fix issues

If you are contributing to an issue, drop a message on
that issue so that I can assign it to you! **If you would be
able to keep me up to date with any progress on that issue,
that would be fantastic**, since it enables me to track
how much work is left to do and to be able to provide any
If you are contributing to an issue, drop a message on that issue so that I can assign it to you!
**If you would be able to keep me up to date with any progress on that issue, that would be
fantastic**, since it enables me to track how much work is left to do and to be able to provide any
help if needed.

Everyone is entitled to their own life, but if I haven't heard anything back for a while,
Expand All @@ -62,22 +40,18 @@ but never actually finished.

## Branching

When you are ready, make a fork of this repo. When you
work on your fork, make sure you create a new branch to
work off of rather than committing to your master/main
branch. This will make it easier for you to update your
copy with any new changes to this project, and avoid
filling pull requests with lots of messy merge commits
unnecessarily!
When you are ready, make a fork of this repo. When you work on your fork, make sure you create
a new branch to work off of rather than committing to your master/main branch. This will make it
easier for you to update your copy with any new changes to this project, and avoid filling pull
requests with lots of messy merge commits unnecessarily!

## Building this project

> [!IMPORTANT]
> This project uses Apache Maven as the build system, and
> requires JDK 11 or newer.
> requires JDK 17 or newer.

To build this project and run the tests, you can run the
following in your terminal:
To build this project and run the tests, you can run the following in your terminal:

```bash
# Linux, Mac OS, Git Bash users
Expand All @@ -87,45 +61,38 @@ following in your terminal:
.\mvnw.cmd clean package verify
```

If you use Windows, you should download the JDK from
somewhere such as https://adoptium.net/en-GB/temurin/.
If you use Windows, you should download the JDK from somewhere such as
https://adoptium.net/en-GB/temurin/.

On Linux and MacOS, I tend to use a tool called
[SDKMan](https://sdkman.io/) to download and install
Java tooling. I personally use Amazon Corretto 17, but
you can use any JDK implementation you like, such as
Temurin, Graal, Liberica, SAP, etc. All should work
On Linux and macOS, I tend to use a tool called [SDKMan](https://sdkman.io/)
to download and install Java tooling. I personally use Amazon Corretto, but you can use any JDK
implementation you like, such as Temurin, Graal, Liberica, SAP, etc. All should work
the same for the most part.

## Licensing

All changes that you make will be applied under the
Apache license, as documented in this repository.
You can find out more about what this means at
[TLDRLegal](https://tldrlegal.com/license/apache-license-2.0-(apache-2.0))!
All changes that you make will be applied under the Apache license, as documented in this
repository. You can find out more about what this means at [TLDRLegal](https://tldrlegal.com/license/apache-license-2.0-(apache-2.0))!

Each file that you create must have a special header
comment at the top that mentions this license.
Each file that you create must have a special header comment at the top that mentions this license.

> [!TIP]
> If you need to add this header to your files, you can run
> `./mvnw license:format` to do it for you automatically!

## Code style

This project uses a modified version of the Google
Code Style guide for Java. The main things to remember
are:
This project uses a modified version of the Google Code Style guide for Java. The main things to
remember are:

- 2-space indentation rather than tabs
- Public classes and methods need a JavaDoc
- Line length is limited to 100 lines

Good things to remember:

- Keep lines of code simple. It is fine to use multiple
lines of code to declare something if it makes it easier
to read.
- Keep lines of code simple. It is fine to use multiple lines of code to declare something if it
- makes it easier to read.
- Keep naming clear and simple!

A tool called CheckStyle will attempt to enforce these rules
Expand All @@ -136,10 +103,9 @@ for you.

## Commits

Please try to keep commits atomic and clear. Each commit
should ideally leave the project in a working state. Each
commit should also have a clear title and explaination as
to what the commit changes, and why.
Please try to keep commits atomic and clear. Each commit should ideally leave the project in a
working state. Each commit should also have a clear title and explanation as to what the commit
changes, and why.

## Deployment process

Expand All @@ -153,6 +119,6 @@ Changelogs are automatically generated from the pull request history between the
`main` branch and the last tag that was added. This is why it is important to have descriptive
pull requests where appropriate.

Upon successfully deploying to Maven Central, a release will be added to the
[releases](../../releases) page on the repository. A changelog will automatically get
attached and any contributors will be `@mentioned` in those changelogs.
Upon successfully deploying to Maven Central, a release will be added to the [releases](../../releases)
page on the repository. A changelog will automatically get attached and any contributors will be
`@mentioned` in those changelogs.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![Java 11+](https://img.shields.io/badge/Java-11--24-brown?logo=openjdk&logoColor=white)
![Java 17+](https://img.shields.io/badge/Java-17%2B-brown?logo=openjdk&logoColor=white)
[![Build Status](https://github.com/ascopes/java-compiler-testing/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/ascopes/java-compiler-testing/actions/workflows/build.yml)
[![Maven Central](https://img.shields.io/maven-central/v/io.github.ascopes.jct/java-compiler-testing)](https://repo1.maven.org/maven2/io/github/ascopes/jct/java-compiler-testing)
[![Code Coverage](https://codecov.io/gh/ascopes/java-compiler-testing/branch/main/graph/badge.svg?token=VT74BP2742)](https://codecov.io/gh/ascopes/java-compiler-testing)
Expand Down Expand Up @@ -331,9 +331,7 @@ holding the flags you wish to use.
`-XX:+TieredCompilation -XX:TieredStopAtLevel=1` to set this up. Enabling this in the JCT
builds reduced the overall build time by around 20 seconds.
2. Use the ZGC - the ZGC will reduce lag when performing garbage collection on code that
has a high churn of objects. On Java 11, the ZGC is an experimental feature, which needs
to be enabled with `-XX:+UnlockExperimentalOptions -XX:+UseZGC`. On Java 17, you just
need to pass `-XX:+UseZGC` alone.
has a high churn of objects. You just need to pass `-XX:+UseZGC` alone.

## Third-party compiler support

Expand Down
13 changes: 0 additions & 13 deletions java-compiler-testing/src/it/checkerframework/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,4 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>${project.artifactId}-incompatible-jdk</id>
<activation>
<!-- No idea why JDK 16 doesn't work specifically. -->
<jdk>16</jdk>
</activation>
<properties>
<maven.test.skip>true</maven.test.skip>
</properties>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class JctDogfoodTest {
.resolve("classes");

@DisplayName("JCT can compile itself as a legacy module source")
@JavacCompilerTest(minVersion = 11, configurers = JctCompilationConfigurer.class)
@JavacCompilerTest(minVersion = 17, configurers = JctCompilationConfigurer.class)
void jctCanCompileItselfAsLegacyModule(JctCompiler compiler) throws IOException {
// Given
try (var workspace = Workspaces.newWorkspace()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ void autoValueImplementationClassIsCreatedAsExpected(JctCompiler compiler) throw
}

private Object callMethod(Object obj, String method, Object... args) throws Throwable {
var cls = obj instanceof Class<?>
? (Class<?>) obj
var cls = obj instanceof Class<?> castCls
? castCls
: obj.getClass();

// Enforce reflective access to be allowed.
Expand Down
13 changes: 0 additions & 13 deletions java-compiler-testing/src/it/google-error-prone/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,4 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<!-- https://github.com/google/error-prone/issues/3710 -->
<id>${project.artifactId}-incompatible-jdk</id>
<activation>
<jdk>[,12)</jdk>
</activation>
<properties>
<maven.test.skip>true</maven.test.skip>
</properties>
</profile>
</profiles>
</project>
Loading
Loading