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

Loader does not report an invalid (quilt.mod.json) entrypoint entry #77

Closed
SilverAndro opened this issue May 5, 2022 · 6 comments
Closed

Comments

@SilverAndro
Copy link
Contributor

Came across this while attempting to use a language adapter, but anything besides a STRING or ARRAY type after the entrypoint ID is silently dropped. This is notable because if you miss the ~15 words in the spec its very easy to attempt something like

"entrypoints": {
  "init": {
    "adapter": "some-adapter",
    "value": "mymod.Main"
  }
}

which due to these lines simply falls through into nothing.

@AlexIIL
Copy link
Contributor

AlexIIL commented May 14, 2022

It looks like loader read the spec incorrectly - that should work AFAIK.

@AlexIIL AlexIIL reopened this May 14, 2022
@AlexIIL
Copy link
Contributor

AlexIIL commented May 14, 2022

This should be fixed in 0.16.1-beta.1.

@SilverAndro
Copy link
Contributor Author

SilverAndro commented May 15, 2022

It looks like loader read the spec incorrectly

yeah re-reading I misunderstood it as well 😅

Unfortunately this doesn't seem to be fixed, my main method contains exitProcess(1) as an obvious "reached here" mark, and without wrapping my entrypoint in [] still, nothing happens

Specifically,

"entrypoints": {
  "init": [{
    "adapter": "kotlin",
    "value": "io.github.p03w.transistor.Main"
  }]
},

invokes my main method (and closes the game with exit code 1) while

"entrypoints": {
  "init": {
    "adapter": "kotlin",
    "value": "io.github.p03w.transistor.Main"
  }
},

Just lets the game launch normally. Don't see anything in the log, just my mod listed as planned to be loaded.

@AlexIIL
Copy link
Contributor

AlexIIL commented May 15, 2022

That's odd. What happens if you remove the value field from the entrypoint? So:

"entrypoints": {
  "init": {
    "adapter": "kotlin"
  }
},

@AlexIIL
Copy link
Contributor

AlexIIL commented May 15, 2022

Ah sorry, I got the version wrong: try 0.16.1-beta.2 instead - I pushed 0.16.1-beta.1 just before to fix an unrelated issue.

@SilverAndro
Copy link
Contributor Author

Ah yep! that runs fine, thanks much!

TheGlitch76 added a commit that referenced this issue May 22, 2022
This version is identical with `0.16.1-beta.3`.

Changelog:
- Fix multiple mod versions being prefixed with "vversion", rather than just "version". - AlexIIL
- Fix reading complex entrypoints in QMJs (#77) - AlexIIL
- Bump maximum in-memory file size - AlexIIL
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