Releases: IrisShaders/glsl-transformer
v2.0.1 - Update of ANTLR to 4.13.1
Updates ANTLR to 4.13.1 which should reduce the size of the jar because ANTLR fixed a bug where its jar size was unnecessarily big.
Full Changelog: v2.0.0...v2.0.1
v2.0.0 - New Parser Features, CST Removal, Root Refactoring and External Declaration Index
This changelog is a summary of the changelogs of the 2.0.0-pre series of prereleases. See the individual releases for details.
With this release glsl-transformer fully moves to AST transformation that is built upon the parsed CST and not bound by the parser's limitations. It also updates how roots, the mechanism for index building and query answering, are built.
Core
- Removed CST transformation and refactored many classes into different packages
- Fixed a number of parsing bugs that resulted in wrong transformation or parsing errors
- Improved parsing of long sequence expressions by refactoring the grammar
- Added optional
#custom
and#include
directives - Added support for parsing special syntax constructs related to ray tracing extensions
- Added line annotation handling, tracks source locations on AST nodes
- Added easier way to control parsing methods with
ParseShape
- Added
RootSupplier
that is a kind of root factory that can be set on the AST transformer and is used to generateRoot
instances easier than having the instantiation hidden in private methods - Made node index and identifier indexes nullable to support using roots that have fewer indexes if they aren't required as this improves overall performance
- Added optional external declaration indexing, including with prefix index structures
- Refactored the APIs of many important classes
- Exposed
ChildNodeList
on AST nodes - Removed old compatibility code with the move to Java 17
Tests
- AST Snapshot tests
- Added more prototypes of transformations that serve as complex tests
- Refactored test resource manager
- Added tests specifically for a number of fixed bugs
Meta
- Refactoring of the documentation with explanation and examples
- The license now AGPLv3
- Gradle upgraded to version 8
- Upgraded to Java 17
Full Changelog: v1.0.1...v2.0.0
v2.0.0-pre13 - Java 17, isNullEmpty Method and Exposure of ChildNodeList by AST Nodes
- Update to Java 17 because it's the LTS release
- Update gradle wrapper to 8.0.2
- Remove old compatibility code
- Added two tests that demonstrate a method that adds a declaration if it doesn't exist (using the ED index) and a transform that moves unsized array specifiers around
- Expose the
ChildNodeList
as a return type onASTNode
subclasses that contain lists of children - Added
isNullEmpty
toChildNodeList
that is likeisEmpty
but also return true if there are only null items in the list
Full Changelog: v2.0.0-pre12...v2.0.0-pre13
v2.0.0-pre12 - Move to Java 16 and Removal of Jabel
glsl-transformer is now using Java 16 and no longer supports Java 8. At the moment, Jabel was removed and the source compatibility is now 16. Future updates will remove compatibility code that is no longer necessary. A mysterious bug was worked around by changing one of the performance tests as it was causing stack overflow exceptions in very specific circumstances.
Full Changelog: v2.0.0-pre11.1...v2.0.0-pre12
v2.0.0-pre11.1 - Fix RootSupplier's Pre-Made Instances
- Fixes the pre-made instances of
RootSupplier
to include the correct index suppliers and wrote a test that confirms this
Full Changelog: v2.0.0-pre11...v2.0.0-pre11.1
v2.0.0-pre11 - Refactoring of Root Methods and Additional RootSupplier Variant
This is a small release changing some things I found while upgrading Iris to the latest glsl-transformer version.
- Added
PREFIX_UNORDERED_ED_EXACT
instance ofRootSupplier
alongside the other pre-made root supplier variants - Refactored static methods of
Root
into instance methods since all of them were simply receiving an instance of the class' type - Updated junit to 5.9.2
- Fix performance tests by giving them a little more time
Meta:
- Update and fix GH Actions build script by making it also use Java 16 as the gradle script specifies
Full Changelog: v2.0.0-pre10...v2.0.0-pre11
v2.0.0-pre10 - Root Refactoring with new External Declaration Index and RootSupplier, Added ParseShape, Fixed Parsing Bug
- Removed the pattern of passing a member of the AST to provide a reference to a root instance
- Added
ParseShape
that neatly contains all the method references that are necessary to tell the GLSL parser, AST builder and cache how to handle a string or some intermediary stage - Added
RootSupplier
that is a kind of root factory that can be set on the AST transformer and is used to generateRoot
instances easier than having the instantiation hidden in private methods - Removed
cloneSeparate
method from all the AST nodes and removed many unnecessary methods fromRoot
- Refactor
ASTBuilder
andASTParser
to match theRootSupplier
changes - Made node index and identifier indexes nullable to support using roots that have fewer indexes if they aren't required as this improves overall performance
- Renamed members of
ExternalDeclarationType
to be consistent with their class and parse rule names - Added
ExternalDeclarationIndex
(EDI) andPrefixExternalDeclarationIndex
- Added a field for EDIs to
Root
and support for tracking external declarations as they are renamed and registered/unregistered - Added many tests for EDIs and prefix EDIs
- Added a test to ensure
DeclarationMember
s are parsed correctly as they were not previously - Fixed a parser grammar bug where declaration members were not parsed correctly, now sequence expressions are correctly disallowed as initializers
- Added documentation about
prefixMap
andprefixQuery
: Using them with indexes that support suffixes and infixes will lead to wrong results unless the user knows the structure of the internal index used by the permuterm indexer - Refactor test resource manager into separate files for easer re-use in glsl-preprocessor and general cleanup
- Updated slf4j dependency to 2.0.0 and jabel to 1.0.0
Meta:
- Added more thoughts on sidecar injection and initializer movement transformation prototypes
- Upgraded to Gradle 8 and fixed the GH Actions script to use Java 16 so that it doesn't break
- Updated the readme with information about glsl-preprocessor and preprocessing in general
Full Changelog: v2.0.0-pre9...v2.0.0-pre10
v2.0.0-pre9 - Line Annotation, Ray Tracing Extension Support, and Sequence Parsing Improvement
- Renamed pragma, extension, custom, and include directive nodes from "statement" to "directive"
- Fix enter and exit method calls for directive nodes
- Introduce
SourceLocation
and copy it on clone - Make #line annotated print types consistent (added simple-type)
- Added #line annotation, parsing and printing, added tests
- Added
TransformationException
that is thrown when something goes wrong when looking for themain
method - Added
ParsingException
that is thrown when something goes wrong during parsing (and lexing) - Refactor grammar to parse sequence expressions sequentially and not recursively. This will avoid stack overflow exceptions when parsing very long sequence expressions.
- Added support for the Vulkan ray tracing extension
GLSL_EXT_ray_tracing
Meta
Full Changelog: v2.0.0-pre8...v2.0.0-pre9
v2.0.0-pre8 - Package Refactoring and Renaming
- Renamed the package
basic
toparser
- Moved some non-parser related things from that package into the
transform
package - Renamed the package
ast.node.basic
toast.node.abstract_node
- Renamed generic type parameters to be more consistent and added a corresponding development documentation section
- Renamed the
append...
andprepend...
methods inTranslationUnit
to be more consistent with each other
Full Changelog: v2.0.0-pre7...v2.0.0-pre8
v2.0.0-pre7 - Update ANTLR4 dependency
- Updated ANTLR4 runtime library to 4.11.1 and updated the snapshots to match the slightly changed error node results
- Cleaned up use of
AutoHintedMatcher
in some tests
Full Changelog: v2.0.0-pre6...v2.0.0-pre7