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

Rework build to use steps-published files #15

Merged
merged 1 commit into from Mar 21, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 10 additions & 13 deletions README.md
Expand Up @@ -8,22 +8,19 @@ also produces `library.xpl`, a step library for the steps.

The resulting grammar will validate either XProc 1.0 or XProc 3.0.

Note: the files in the `/steps/` directory are published automatically
by the `3.0-steps` repository. Do not edit those files!

## Circular dependency

The grammar is stored in a separate repository because the language
specification and the step specifications are in separate repositories
and they both depend on the grammar.

Unfortunately, the grammar also depends on the specifications, so
there’s an unavoidable circular dependency here.

1. If the core grammar changes, rebuild this repository then rebuild
the language and step repositories so that the proper core grammar
is reflected in the language and step specifications. (Pushing a change
to this repository will automatically rebuild it.)

2. If a grammar fragment in the language specification or a
`p:declare-step` template in a step specification changes, rebuild
this grammar repository _after_ publishing the updated specification
so that those changes are reflected in
https://grammar.xproc.org/xproc-3.0/library.xpl
There is a circular dependency here, but it’s managed as follows:

1. Updating this repository will republish the grammar and library.

2. When the `3.0-steps` repository is published, it automatically
updates the files in `/steps/`, which republishes the grammar and
the library.
7 changes: 3 additions & 4 deletions build.gradle
Expand Up @@ -101,12 +101,11 @@ task xproc_library(type: XMLCalabashTask) {

stepList.each { spec ->
[ "library.xml", "steps.rnc", "steps.rng" ].each { fn ->
Task t = task "download_${spec}_${fn}"(type: Download) {
src "$stepsBaseUri/$spec/$fn"
dest "$buildDir/$spec/$fn"
Task t = task "download_${spec}_${fn}"(type: Copy) {
from "steps/$spec/$fn"
into "$buildDir/$spec/"
doFirst { mkdir "$buildDir/$spec" }
}
t.onlyIf { ! file("$buildDir/$spec/$fn".toString()).exists() }
xproc_library.dependsOn t
}
}
Expand Down
1 change: 0 additions & 1 deletion gradle.properties

This file was deleted.

8 changes: 8 additions & 0 deletions steps/README
@@ -0,0 +1,8 @@
# Steps

DO NOT EDIT THESE FILES

These files are generated by the 3.0-steps repository build process
and committed here automatically.