diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index d0e9100..817c93d 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -29,3 +29,8 @@ jobs: - run: npm install - run: npm run ci - run: npm test + - name: Publish parser source + uses: actions/upload-artifact@v2 + with: + name: generated-parser-src + path: src diff --git a/README.md b/README.md index 66d27ae..dc43867 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,15 @@ This repository currently omits most of the code that is autogenerated during a `grammar.json` and `parser.c` are both only available following a build. It also significantly reduces noise during diffs. -The side benefit of not checking in `parser.c` is that parsers aren't always backwards compatible. If you need a parser, -generate it yourself using the CLI; all the information to do so is available in this package. By doing that, you'll -also know for sure that your parser version and your library version are compatible. +The side benefit of not checking in `parser.c` is that you can guarantee backwards compatibility. Parsers generated by +the tree-sitter CLI aren't always backwards compatible. If you need a parser, generate it yourself using the CLI; all +the information to do so is available in this package. By doing that, you'll also know for sure that your parser version +and your library version are compatible. + +If you need a `parser.c`, and you don't care about the tree-sitter version, but you don't have a local setup that would +allow you to obtain the parser, you can just download one from a recent workflow run in this package. To do so: +* Go to the [GitHub actions page](https://github.com/alex-pinkus/experimental-tree-sitter-swift/actions) for this + repository. +* Click on the appropriate commit. +* Go down to `Artifacts` and click on `generated-parser-src`. All the relevant parser files will be available in your + download.