Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Check C coverage
run: doxygen Doxyfile
- name: Check Java coverage
run: javadoc -Xdoclint:all,-missing -d doc/java -sourcepath java/api/target/generated-sources/java/:java/api/src/main/java org.ruby_lang.prism
run: javadoc -Xdoclint:all,-missing -d doc/java -sourcepath java/api/src/main/java-templates/:java/api/src/main/java org.ruby_lang.prism
- name: Generate Rust documentation
run: |
bundle exec rake cargo:build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Build with Doxygen
run: doxygen Doxyfile
- name: Build with JavaDoc
run: javadoc -Xdoclint:all,-missing -d doc/java -sourcepath java/api/target/generated-sources/java/:java/api/src/main/java org.ruby_lang.prism
run: javadoc -Xdoclint:all,-missing -d doc/java -sourcepath java/api/src/main/java-templates/:java/api/src/main/java org.ruby_lang.prism
- name: Build with rustdoc
run: |
bundle exec rake cargo:build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/java-wasm-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ jobs:
- uses: actions/upload-artifact@v7
with:
name: prism.wasm
path: java/wasm/src/test/resources/prism.wasm
path: java/wasm/src/main/wasm/prism.wasm
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ out.svg
/java/org/ruby_lang/prism/AbstractNodeVisitor.java
/java/org/ruby_lang/prism/Loader.java
/java/org/ruby_lang/prism/Nodes.java
/java/wasm/src/test/resources/prism.wasm
/java/wasm/src/main/wasm/prism.wasm
/lib/prism/compiler.rb
/lib/prism/dispatcher.rb
/lib/prism/dot_visitor.rb
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ all: shared static
shared: build/libprism.$(SOEXT)
static: build/libprism.a
wasm: javascript/src/prism.wasm
java-wasm: java/wasm/src/test/resources/prism.wasm
java-wasm: java/wasm/src/main/wasm/prism.wasm

build/libprism.$(SOEXT): $(SHARED_OBJECTS)
$(ECHO) "linking $@ with $(CC)"
Expand All @@ -51,7 +51,7 @@ javascript/src/prism.wasm: Makefile $(SOURCES) $(HEADERS)
-Oz -g0 -flto -fdata-sections -ffunction-sections \
-o $@ $(SOURCES)

java/wasm/src/test/resources/prism.wasm: Makefile $(SOURCES) $(HEADERS)
java/wasm/src/main/wasm/prism.wasm: Makefile $(SOURCES) $(HEADERS)
$(ECHO) "building $@"
$(Q) $(MAKEDIRS) $(@D)
$(Q) $(WASI_SDK_PATH)/bin/clang \
Expand Down
6 changes: 3 additions & 3 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ A lot of code in prism's repository is templated from a single configuration fil
* `include/prism/node_new.h` - for defining the functions that create the nodes in C
* `javascript/src/deserialize.js` - for defining how to deserialize the nodes in JavaScript
* `javascript/src/nodes.js` - for defining the nodes in JavaScript
* `java/api/target/generated-sources/java/org/ruby_lang/prism/AbstractNodeVisitor.java` - for defining the visitor interface for the nodes in Java
* `java/api/target/generated-sources/java/org/ruby_lang/prism/Loader.java` - for defining how to deserialize the nodes in Java
* `java/api/target/generated-sources/java/org/ruby_lang/prism/Nodes.java` - for defining the nodes in Java
* `java/api/src/main/java-templates/org/ruby_lang/prism/AbstractNodeVisitor.java` - for defining the visitor interface for the nodes in Java
* `java/api/src/main/java-templates/org/ruby_lang/prism/Loader.java` - for defining how to deserialize the nodes in Java
* `java/api/src/main/java-templates/org/ruby_lang/prism/Nodes.java` - for defining the nodes in Java
* `lib/prism/compiler.rb` - for defining the compiler for the nodes in Ruby
* `lib/prism/dispatcher.rb` - for defining the dispatch visitors for the nodes in Ruby
* `lib/prism/dot_visitor.rb` - for defining the dot visitor for the nodes in Ruby
Expand Down
3 changes: 3 additions & 0 deletions java/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
api/src/main/java-templates
api/target
native/target
wasm/src/main/wasm
wasm/target
target
.idea
4 changes: 2 additions & 2 deletions java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Sources under `api` are generated from templates in `../templates`. Those source
$ PRISM_EXCLUDE_PRETTYPRINT=1 PRISM_SERIALIZE_ONLY_SEMANTICS_FIELDS=1 bundle exec rake templates
```

The files go under `api/target/generated-sources/java` and will be removed with `mvn clean`.
The files are generated under `api/src/main/java-templates` and will not be removed with `mvn clean`.

### WASM build of Prism

Expand All @@ -28,7 +28,7 @@ The `wasm` project needs a WASM build of Prism to be generated with the followin
$ make java-wasm WASI_SDK_PATH=<path to WASI sdk>
```

The files go under `wasm/target/generated-sources/wasm` and will be removed with `mvn clean`.
The build is generated under `wasm/src/main/wasm` and will not be removed with `mvn clean`.

### Build and install

Expand Down
2 changes: 1 addition & 1 deletion java/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</goals>
<configuration>
<sources>
<source>target/generated-sources/java</source>
<source>src/main/java-templates</source>
</sources>
</configuration>
</execution>
Expand Down
16 changes: 0 additions & 16 deletions java/native/pom.xml

This file was deleted.

16 changes: 0 additions & 16 deletions java/native/src/main/java/org/ruby_lang/prism/Parser.java

This file was deleted.

1 change: 0 additions & 1 deletion java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@

<modules>
<module>api</module>
<module>native</module>
<module>wasm</module>
</modules>

Expand Down
2 changes: 1 addition & 1 deletion java/wasm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
</goals>
<configuration>
<name>org.ruby_lang.prism.wasm.PrismParser</name>
<wasmFile>src/test/resources/prism.wasm</wasmFile>
<moduleInterface>org.ruby_lang.prism.wasm.Prism</moduleInterface>
<wasmFile>src/main/wasm/prism.wasm</wasmFile>
</configuration>
</execution>
</executions>
Expand Down
1 change: 0 additions & 1 deletion java/wasm/src/test/resources/.gitignore

This file was deleted.

6 changes: 3 additions & 3 deletions templates/template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -684,9 +684,9 @@ def locals
"javascript/src/deserialize.js",
"javascript/src/nodes.js",
"javascript/src/visitor.js",
"java/api/target/generated-sources/java/org/ruby_lang/prism/Loader.java",
"java/api/target/generated-sources/java/org/ruby_lang/prism/Nodes.java",
"java/api/target/generated-sources/java/org/ruby_lang/prism/AbstractNodeVisitor.java",
"java/api/src/main/java-templates/org/ruby_lang/prism/Loader.java",
"java/api/src/main/java-templates/org/ruby_lang/prism/Nodes.java",
"java/api/src/main/java-templates/org/ruby_lang/prism/AbstractNodeVisitor.java",
"lib/prism/compiler.rb",
"lib/prism/dispatcher.rb",
"lib/prism/dot_visitor.rb",
Expand Down