Skip to content
Open
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
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dependencies {
implementation 'net.minecraftforge:srgutils:0.5.4'
implementation 'org.parchmentmc.feather:io-moshi:1.0.0.3'
implementation 'com.google.guava:guava:33.4.0-jre'
implementation 'net.fabricmc.unpick:unpick-format-utils:2.3.0'
implementation 'net.fabricmc.unpick:unpick-format-utils:3.0.0-beta.8'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure we want to use Beta versions?

@sciwhiz12 What do you think? I am on the fence i want this to be stable before it gets added....

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should go ahead with this update given that loom has added support for unpick v3 and that support in JST was recently merged. I believe the library is in beta because given v3 is quite new and had quite a few changes there might be bugs (I wouldn't expect any in what we use - the parser, that is, maybe in the applicator there might be), but otherwise the format is quite final.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May as well update to the latest beta before merging though

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, we can update to Unpick V3. I don't see why not; yes, it's in beta, but there doesn't seem to be any changes to the format since this PR was made, and I don't think there will be any changes afterwards until 'full' release.


testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.4'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.11.4'
Expand All @@ -41,7 +41,7 @@ test {
}

java {
toolchain.languageVersion = JavaLanguageVersion.of(8)
toolchain.languageVersion = JavaLanguageVersion.of(21)
withSourcesJar()
withJavadocJar()
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* Reader for a simple and quickly editable input file format.
*
* @see <a href="https://github.com/ParchmentMC/Compass/wiki/Simple-Input-File-Format"><tt>ParchmentMC/Compass</tt>
* @see <a href="https://github.com/ParchmentMC/Compass/wiki/Simple-Input-File-Format">{@code ParchmentMC/Compass}
* repository wiki, "Simple Input File Format"</a>
*/
public class SimpleInputFileReader {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.parchmentmc.compass.tasks;

import com.google.common.io.Files;
import daomephsta.unpick.constantmappers.datadriven.parser.v2.UnpickV2Reader;
import daomephsta.unpick.constantmappers.datadriven.parser.v2.UnpickV2Writer;
import daomephsta.unpick.constantmappers.datadriven.parser.v3.UnpickV3Reader;
import daomephsta.unpick.constantmappers.datadriven.parser.v3.UnpickV3Writer;
import org.gradle.api.DefaultTask;
import org.gradle.api.file.DirectoryProperty;
import org.gradle.api.file.RegularFileProperty;
Expand All @@ -11,7 +11,7 @@
import org.gradle.api.tasks.TaskAction;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
Expand All @@ -24,13 +24,13 @@ public void run() throws IOException {
List<File> files = new ArrayList<>(getInputDirectory().getAsFileTree().getFiles());
files.sort(Comparator.comparing(File::getName));

UnpickV2Writer writer = new UnpickV2Writer();
UnpickV3Writer writer = new UnpickV3Writer();
for (File file : files) {
if (!file.getName().endsWith(".unpick")) {
continue;
}

try (UnpickV2Reader reader = new UnpickV2Reader(new FileInputStream(file))) {
try (UnpickV3Reader reader = new UnpickV3Reader(new FileReader(file))) {
reader.accept(writer);
}
}
Expand Down