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

Simplify plugin configuration #179

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Commits on Jun 27, 2024

  1. Configuration menu
    Copy the full SHA
    c910ff5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c8992ab View commit details
    Browse the repository at this point in the history
  3. Create java file in subdirectory matching package

    Introduce GenerateLexerTask.targetRootOutputDir as a replacement of
    targetOutputDir. When using the new property, the task creates the java
    sources in the directory matching the package name. The package name is
    detected using some heuristics. The commit also introduces
    GenerateLexerTask.packageName to manually specify the package name.
    JojOatXGME committed Jun 27, 2024
    Configuration menu
    Copy the full SHA
    e6d8b38 View commit details
    Browse the repository at this point in the history
  4. Make pathToParser and pathToPsiRoot optional

    The two properties of GenerateParserTask are only used when
    purgeOldFiles is explicitly set to true, but they still had to be
    specified.
    
    As of this commit, if purgeOldFiles is set to true but none of the two
    properties are specified, the task will delete the whole content of
    targetRootOutputDir.
    
    I am not aware of any reason not to delete the whole directory of
    targetRootOutputDir unless the directory is overlapping with other files
    than the files generated by this task. Since overlapping task outputs
    are explicitly discouraged by Gradle, I deprecated the two properties.
    JojOatXGME committed Jun 27, 2024
    Configuration menu
    Copy the full SHA
    713bf6a View commit details
    Browse the repository at this point in the history
  5. Purge stale files by default

    Stale files should be avoided because they can cause build failures at
    subsequent tasks in incremental builds. For example removing a grammar
    rule from a *.bnf file may cause a compilation error when the stale AST
    note tries to call its corresponding method on the visitor.
    
    In combination with the build cache, a stale file may even be persisted
    in the cache, making :clean ineffective for fixing such issue.
    JojOatXGME committed Jun 27, 2024
    Configuration menu
    Copy the full SHA
    b4eeba6 View commit details
    Browse the repository at this point in the history
  6. Add default for targetRootOutputDir

    The default should be sufficient in most use cases and makes the
    configuration of the plugin a bit easier. Note that the default is only
    available for the tasks :generateLexer and :generateParser. Custom tasks
    of type GenerateLexerTask or GenerateParserTask do not have a default
    for this property.
    JojOatXGME committed Jun 27, 2024
    Configuration menu
    Copy the full SHA
    fcdd567 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    79f08a4 View commit details
    Browse the repository at this point in the history
  8. Update CHANGELOG.md

    JojOatXGME committed Jun 27, 2024
    Configuration menu
    Copy the full SHA
    a72533f View commit details
    Browse the repository at this point in the history