Repository navigation
Conversation
FindFunction loaded a qualified name's namespace by path without munging it, so `nos my-game.build/compile` looked for my-game/build.clj, and a namespace with no file escaped as an uncaught FileNotFoundException. It now loads through Runtime.Require, which munges the dash and skips a namespace already loaded, and treats FileNotFoundException as a miss. Run returned true for a file whose -main it could not find, which the miss would have turned into silent success for a file in a subdirectory; it now returns false there. LoadNostrand loaded nostrand.core and nostrand.tasks through *load-fn*, reloading both on every call. It now loads through Require. The commented-out lines left in LoadNostrand and Run from the old Main go with them.
FindFunction split a qualified name on every slash, so a file path like sub/dir/thing.clj was read as namespace sub, and Run looked up a file's -main by its path, which the same split broke for any file in a subdirectory. A qualified name now has exactly one slash, and Run derives the file's namespace with the new Nostrand.FileToNamespace. Run's own FileNotFoundException catch goes, since FindFunction already treats that as a miss.
Runtime.Require passed an empty name straight to require. It now throws ArgumentException, since Require is engine API a host calls directly.
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.
Closes #190
FindFunctionloads a qualified name's namespace throughRequire, so dashed namespaces resolve, and an unknown namespace is a miss instead of an uncaughtFileNotFoundExceptionRunfinds a file's-mainwith the newNostrand.FileToNamespace, so files in subdirectories runRunreturnsfalsefor a file without a-maininstead of exiting silentlyRequirerejects an empty name withArgumentExceptionLoadNostrandloads throughRequire, so a second call does not reload nostrand