Skip to content

Releases: ascopes/java-compiler-testing

v1.0.0-RC1

28 May 08:19
Compare
Choose a tag to compare

This is the first release candidate for the v1.0 stable release.

Changes

The aim of this set of changes is to remove all deprecated functionality that has been removed to simplify this API for the vast majority of use cases. I have attempted to ensure all functionality that may still be required in edge cases is still accessible via more explicit method calls.

The details of these changes are az follows:

  • Remove deprecated features for v1.0.0 by @ascopes in #395
    • Remove 'modules' parameter for JavacCompilersTest and related functionality.
    • Remove 'modules' parameter in minSupportedVersion and maxSupportedVersion in JavacJctCompilerImpl.
    • Remove deprecated JctCompilers.createPlatformCompiler, as we now just use JctCompilers.newPlatformCompiler instead.
    • Remove deprecation warnings around toString in AbstractJctCompiler.
    • Remove default override for JctCompilation.getArguments -- this is now a required method to be implemented by custom implementations.
    • Move PathRoot.asJar into implementation level. Custom PathRoots must now provide this method explicitly.
    • Remove platform classpath features deprecated in #396 -- platform classpath functionality historically was for Java versions prior to Java 11, and is mostly replaced with the system modules mechanism. If you still need to use this, you can use one of the method overrides that consume a Location object instead, passing StandardLocation.PLATFORM_CLASS_PATH as the Location parameter.
    • Remove obscure deprecated methods in JctFileManager and Workspace classes as part of GH-417. If you still need to use this, you can use one of the method overrides that consume a Location object instead, passing StandardLocation as the Location parameter. The following methods have been affected:
      • Removed JctFileManager.getNativeHeaderOutputGroup
      • Removed JctFileManager.getUpgradeModulePathGroup
      • Removed JctFileManager.getSystemModulesGroup
      • Removed JctFileManager.getPatchModulePathGroup
      • Removed Workspace.addNativeHeaderOutputPackage
      • Removed Workspace.addNativeHeaderOutputModule
      • Removed Workspace.addUpgradeModulePathModule
      • Removed Workspace.addSystemModulePathModule
      • Removed Workspace.addPatchModulePathModule
      • Removed Workspace.createNativeHeaderOutputPackage
      • Removed Workspace.createNativeHeaderOutputModule
      • Removed Workspace.createUpgradeModulePathModule
      • Removed Workspace.createSystemModulePathModule
      • Removed Workspace.createPatchModulePathModule
      • Removed Workspace.getNativeHeaderOutputPackages
      • Removed Workspace.getNativeHeaderOutputModules
      • Removed Workspace.getUpgradeModulePathModules
      • Removed Workspace.getSystemModulePathModules
      • Removed Workspace.getPatchModulePathModules
      • Removed Workspace.getNativeHeaderOutputModule
      • Removed Workspace.getUpgradeModulePathModule
      • Removed Workspace.getSystemModulePathModule
      • Removed Workspace.getPatchModulePathModule
    • Remove deprecated RamFileSystemProvider mechanism
    • Fix MemoryFileSystemProviderImpl to make use of the provided file system name
    • Fix a couple of bugs regarding MemoryFileSystemProvider disallowing specific
      characters in file system names.
    • Remove JctCompilationAssert.generatedHeaders - If you still need to use this, you can use one of the method overrides that consume a Location object instead, passing StandardLocation as the Location parameter.
    • Remove methods deprecated in GH-447 for JctCompilationAssert - all of these have new methods in the same class that are named consistently with the rest of this library. Check the documentation for JctCompilationAssert to see what is available.
      • Removed JctCompilationAssert.classOutput
      • Removed JctCompilationAssert.sourceOutput
      • Removed JctCompilationAssert.classPath
      • Removed JctCompilationAssert.sourcePath
      • Removed JctCompilationAssert.moduleSourcePath
      • Removed JctCompilationAssert.modulePath
    • Remove deprecated PathFileObject.getFullPath, which has been replaced with PathFileObject.getAbsolutePath
    • Make PathFileObject into an interface, and make the existing implementation become part of the internal API.

Full Changelog: v0.7.3...v1.0.0-RC1

v0.7.3

27 May 12:39
Compare
Choose a tag to compare

What's Changed

  • Implement path file object assertion tests by @ascopes in #469

    • This deprecates PathFileObject#getFullPath. Use PathFileObject#getAbsolutePath instead. The former will be removed in v1.0.0.
  • Bump gmavenplus-plugin from 2.1.0 to 3.0.0 by @dependabot in #472

  • Bump lombok from 1.18.26 to 1.18.28 by @dependabot in #473

  • Bump maven-checkstyle-plugin from 3.2.2 to 3.3.0 by @dependabot in #471

  • Bump avaje-inject.version from 9.1 to 9.2 by @dependabot in #470

  • Bump auto-service from 1.0.1 to 1.1.0 by @dependabot in #474

  • Bump maven-source-plugin from 3.2.1 to 3.3.0 by @dependabot in #475

Full Changelog: v0.7.2...v0.7.3

v0.7.2

20 May 13:29
Compare
Choose a tag to compare

What's Changed

  • Improve error messages in assertions for trace diagnostics and stack trace elements.
  • Fix bug that raised a NullPointerException when asserting on null TraceDiagnostic objects

Full Changelog: v0.7.1...v0.7.2

v0.7.1

15 May 07:35
Compare
Choose a tag to compare

Bugfixes

  • Update memoyfilesystem with URL handling bugfixes by @ascopes in #465

Full Changelog: see v0.7.0...v0.7.1 for the full changelist, including test fixes, test dependency updates, etc.

v0.7.0

10 May 10:10
Compare
Choose a tag to compare

What's Changed

Removed JIMFS as the underlying RAM file system implementation and switched to using memoryfilesystem. This shouldn't break any existing code, but I have made it a minor release bump just to flag this as a major internal change.

Please raise an issue or discussion for any bugs or queries.

Changelog

Full Changelog: v0.6.4...v0.7.0

v0.6.4

07 May 11:33
Compare
Choose a tag to compare

What's Changed

  • Fix naming ambiguities and inconsistencies in the API by @ascopes in #448
  • Fixed a NPE thrown when asserting files existed with fuzzy matching on ZIP files by @ascopes in #448

Full Changelog: v0.6.3...v0.6.4

v0.6.3

06 May 09:56
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.6.2...v0.6.3

v0.6.2

26 Apr 07:32
Compare
Choose a tag to compare

What's Changed

  • Refactor out fuzzy string logic to an internal facility by @ascopes in #424
  • Improvements to assertion error messages and exceptions

Full Changelog: v0.6.1...v0.6.2

v0.6.1

19 Apr 07:20
Compare
Choose a tag to compare

Some minor QA fixes.

  • Fixes to error messages in assertions
  • Fixes and improvements to logging output

Full Changelog: v0.6.0...v0.6.1

v0.6.0

08 Apr 14:00
Compare
Choose a tag to compare

What's Changed

New features

API changes and improvements

  • OutputContainerGroups can now only hold a single package, since JSR-199 does not provide a clear API to handle more than one package in an output group. This does not affect modules. (@ascopes, see 27eaf51)
  • Improved internal error messages that get thrown to the user if various invalid file-system states occur (@ascopes, see 851d9a4)
  • Fuzzy string handling in assertions for files and modules has been reworked, fixing several issues where FileSystemException and similar exception types could be raised when JARs and archives were on a location with non-archive directory paths. The error output has also been totally rewritten to be clearer and simpler. (@ascopes, see 859a660)
  • Fixes to documentation, adding missing detail and fixing mistakes in multiple places.

Deprecated features

For a full list of deprecated features, view the deprecation page in the JavaDocs here.

  • All features relating to the platform/bootstrap classpath have been deprecated and will be removed in v1.0.0. This has been done since the platform class path has been mostly replaced by the JPMS mechanisms from Java 9 onwards, and using this parameter is buggy and can lead to confusing behaviour. If you need to use this feature still, check the documentation for alternatives. No actual functionality is being restricted by this change, only API shortcuts. (@ascopes, see 68fadf2)
  • Features relating to lesser-used locations have been deprecated and will be removed in v1.0.0, instead, you should access the locations as documented (e.g. addModule(StandardLocation.PATCH_MODULE_PATH) rather than addPatchModulePathModule). This has been done to reduce the noise in the API and keep things simple for the majority of use cases. No actual functionality is being restricted by this change, only API shortcuts. This affects: SYSTEM_MODULES, PATCH_MODULE_PATH, UPGRADE_MODULE_PATH, NATIVE_HEADER_OUTPUTS. (@ascopes, see 4e37df1 and a5369d0).
  • RamFileSystemProvider has been deprecated and will be removed in v1.0.0. No mechanism exists to replace this functionality. This has been removed as it is not needed for the vast majority of usecases, and only exists to further confuse usage. If you do somehow need to use this mechanism, please open an issue so I can discuss it and understand the reasoning behind it more clearly. (@ascopes, see 5b5a3df)

Internal changes

  • New internal API for listing internal path roots for archives such as JARs - (@ascopes, see 2e47542)
  • Testing against newer releases of Spring, Avaje, Micronaut, groovy.
  • Internal test pack fixes for https://youtrack.jetbrains.com/issue/IDEA-317391.
  • Internal test pack fixes for some issues regarding concurrency in JUnit-related tests.

Full Changelog: v0.5.0...v0.6.0

Future changes

v1.0.0

A branch and draft PR has been opened to hold changes that will be made for v1.0.0. You can review this at #395

Eclipse Compiler for Java

I have began to work on re-integrating ECJ support into JCT. Right now I am firefighting with several major bugs that I was previously aware of that reside within the ECJ codebase. A preview of potential changes can be reviewed at #422.

Java 21 support

I am still waiting on Mockito to provide Java 21 support via the version of ByteBuddy that is bundled. JaCoCo has pushed a new version recently (v0.8.9) that supports Java 20 and Java 21 bytecode, which is also a prerequisite. As a result of this, the code in this release also now runs JaCoCo across Java 20 builds correctly.

Class file and stacktrace assertions

I am still waiting on some PRs for stacktrace assertions and reflective assertions across classes and classloaders to be merged in AssertJ-Core. Once these become available, then I will upgrade JCT and bundle them in a new release.

JIMFS guava-related security warnings.

The CVEs reported in Google Guava that are pulled in via JIMFS do not actively impact JCT in any way (JCT does not use Guava directly, and tempfile handling in JIMFS will remain limited to the permissions of the active user anyway). I am still waiting on Google's team to push a new release for JIMFS, which should include an update to Google Guava, as well as improvements to support JPMS properly.