Repository navigation
be-js: report an unconfigured library instead of throwing - #613
Open
notactuallytreyanastasio wants to merge 1 commit into
Open
notactuallytreyanastasio wants to merge 1 commit into
notactuallytreyanastasio wants to merge 1 commit into
Conversation
`temper run -b js` looked the library up with `getValue` before
checking anything, so a `--library` that names no library, or one
whose config file does not parse, ended in an uncaught Kotlin
exception:
Exception in thread "main" java.util.NoSuchElementException: Key no-such-library is missing in the map.
at lang.temper.be.js.RunJsKt.runJsBestEffort(RunJs.kt:69)
The metadata lookup right below it already returns a CliFailure for a
library the build does not know, as py, lua and java do. The
`getValue` threw first. A plain `get` lets that check run; the config
is only read for its library name, which is null-safe already.
Now:
## exception.msg: No JS library name for RunLibraryRequest(libraryName=no-such-library, taskName=run)
Run failed
RunTest.runJsBackendUnknownLibrary runs the `run` input with a
library name it does not have. Before this change it fails with the
NoSuchElementException; after, the run reports failure.
Fixes temperlang#611.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Bobby Grayson <bobbbygrayson+github@gmail.com>
mikesamuel
approved these changes
Oct 12, 2026
mikesamuel
left a comment
Contributor
There was a problem hiding this comment.
Failing over to the already established default path seems like a fine fix. Thanks for including a test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
temper run -b jslooked the library up withgetValuebeforechecking anything, so a
--librarythat names no library, or onewhose config file does not parse, ended in an uncaught Kotlin
exception:
The metadata lookup right below it already returns a CliFailure for a
library the build does not know, as py, lua and java do. The
getValuethrew first. A plaingetlets that check run; the configis only read for its library name, which is null-safe already.
Now:
RunTest.runJsBackendUnknownLibrary runs the
runinput with alibrary name it does not have. Before this change it fails with the
NoSuchElementException; after, the run reports failure.
Fixes #611.
Reproduction:
58-js-run-missing-library-crash/in temper-issue-repros.🤖 Generated with Claude Code