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

Avoid passing .gitkeep files to Claritas #25

Closed
Aeris1One opened this issue Apr 6, 2021 · 3 comments
Closed

Avoid passing .gitkeep files to Claritas #25

Aeris1One opened this issue Apr 6, 2021 · 3 comments
Assignees

Comments

@Aeris1One
Copy link

I have a CI job running from my git repo, so we just need to push updates of mods and github actions build the new distro and commit it. The only problem is when we have for exemple no optionaloff mods, so the folder is empty.
Nebula crashs when any required folder is not present and as Git doesn't like committing empty folders we had to add a .gitkeep file to each empty folder so they are commited. Nebula think they're mods and pass them to Claritas and seems to be the cause of a crash.

[2021-04-06 10:58:01] [info] [Claritas]: 10:58:01.924 [main] INFO com.dscalzi.claritas.Main - Pulling arguments from argFile at /home/runner/work/Distribution/Distribution/servers/MineCityLifeRP-1.7.10/claritasWork/claritasArgFile.txt
[2021-04-06 10:58:02] [info] [Claritas]: 10:58:02.007 [main] DEBUG com.dscalzi.claritas.Main - TYPE       = FORGE
[2021-04-06 10:58:02] [info] [Claritas]: 10:58:02.008 [main] DEBUG com.dscalzi.claritas.Main - MC VERSION = 1.7.10
[2021-04-06 10:58:02] [info] [Claritas]: 10:58:02.008 [main] DEBUG com.dscalzi.claritas.Main - JAR PATHS  = [/home/runner/work/Distribution/Distribution/servers/MineCityLifeRP-1.7.10/forgemods/required/.gitkeep, /home/runner/work/Distribution/Distribution/servers/MineCityLifeRP-1.7.10/forgemods/optionalon/.gitkeep, /home/runner/work/Distribution/Distribution/servers/MineCityLifeRP-1.7.10/forgemods/optionaloff/.gitkeep]
[2021-04-06 10:58:02] [info] [Claritas]: 10:58:02.009 [main] DEBUG com.dscalzi.claritas.Main - OUTPUT     = /home/runner/work/Distribution/Distribution/servers/MineCityLifeRP-1.7.10/claritasWork/claritasOutput.json
[2021-04-06 10:58:02] [info] [Claritas]: 10:58:02.026 [main] ERROR com.dscalzi.claritas.discovery.LibraryAnalyzer - IOException while opening jar file.
java.util.zip.ZipException: zip file is empty
	at java.base/java.util.zip.ZipFile$Source.zerror(ZipFile.java:1581)
	at java.base/java.util.zip.ZipFile$Source.findEND(ZipFile.java:1389)
	at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1483)
	at java.base/java.util.zip.ZipFile$Source.<init>(ZipFile.java:1288)
	at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1251)
	at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:732)
	at java.base/java.util.zip.ZipFile$CleanableResource.get(ZipFile.java:849)
	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:247)
	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:177)
	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:148)
	at com.dscalzi.claritas.discovery.LibraryAnalyzer.analyze(LibraryAnalyzer.java:69)
	at com.dscalzi.claritas.Main.main(Main.java:91)
[2021-04-06 10:58:02] [info] [Claritas]: 10:58:02.026 [main] ERROR com.dscalzi.claritas.discovery.LibraryAnalyzer - IOException while opening jar file.
java.util.zip.ZipException: zip file is empty
	at java.base/java.util.zip.ZipFile$Source.zerror(ZipFile.java:1581)
	at java.base/java.util.zip.ZipFile$Source.findEND(ZipFile.java:1389)
	at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1483)
	at java.base/java.util.zip.ZipFile$Source.<init>(ZipFile.java:1288)
	at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1251)
	at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:732)
	at java.base/java.util.zip.ZipFile$CleanableResource.get(ZipFile.java:849)
	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:247)
	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:177)
	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:148)
	at com.dscalzi.claritas.discovery.LibraryAnalyzer.analyze(LibraryAnalyzer.java:69)
	at com.dscalzi.claritas.Main.main(Main.java:91)
[2021-04-06 10:58:02] [info] [Claritas]: 10:58:02.028 [main] ERROR com.dscalzi.claritas.discovery.LibraryAnalyzer - IOException while opening jar file.
java.util.zip.ZipException: zip file is empty
	at java.base/java.util.zip.ZipFile$Source.zerror(ZipFile.java:1581)
	at java.base/java.util.zip.ZipFile$Source.findEND(ZipFile.java:1389)
	at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1483)
	at java.base/java.util.zip.ZipFile$Source.<init>(ZipFile.java:1288)
	at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1251)
	at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:732)
	at java.base/java.util.zip.ZipFile$CleanableResource.get(ZipFile.java:849)
	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:247)
	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:177)
	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:148)
	at com.dscalzi.claritas.discovery.LibraryAnalyzer.analyze(LibraryAnalyzer.java:69)
	at com.dscalzi.claritas.Main.main(Main.java:91)
[2021-04-06 10:58:02] [info] [Claritas]: 10:58:02.244 [main] INFO com.dscalzi.claritas.Main - Result saved to /home/runner/work/Distribution/Distribution/servers/MineCityLifeRP-1.7.10/claritasWork/claritasOutput.json
[2021-04-06 10:58:02] [info] [Claritas]: results::{}
[2021-04-06 10:58:02] [info] [Claritas]: 
[2021-04-06 10:58:02] [info] [Claritas]: Exited with code 0
[2021-04-06 10:58:02] [error] [Index]: Failed to generate distribution with root /home/runner/work/Distribution/Distribution. 
Error: Archive read error
    at FsRead.readUntilFoundCallback [as callback] (/home/runner/work/Distribution/Distribution/Nebula/node_modules/node-stream-zip/node_stream_zip.js:179:46)
    at FsRead.readCallback (/home/runner/work/Distribution/Distribution/Nebula/node_modules/node-stream-zip/node_stream_zip.js:992:25)
    at tick (fs.js:523:7)
    at processTicksAndRejections (internal/process/task_queues.js:75:11)

Is it possible to avoid .gitkeep files to be understood by Nebula as mod files ?

@Aeris1One
Copy link
Author

Changed my workflow so it removes all .gitkeep files, then run Nebula then readd .gitkeep files in all empty dirs.
Would be great if Nebula ignore them though

@dscalzi
Copy link
Owner

dscalzi commented Apr 6, 2021

should be easy enough

@dscalzi
Copy link
Owner

dscalzi commented Apr 6, 2021

I'll have something for you later today

@dscalzi dscalzi self-assigned this Apr 6, 2021
@dscalzi dscalzi closed this as completed in 362bbc1 Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants