-
Notifications
You must be signed in to change notification settings - Fork 119
Project-local + relocated-bundle support: resolver, JIT rpath, .app bundle #2588
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
2e1cf83
project-local + relocated-bundle support across resolver, JIT, daspkg
borisbat 0816bc9
daspkg release: dasPUGIXML for Info.plist + sanitize derived bundle i…
borisbat d764664
daspkg release: propagate runtime-copy failures, glob across config d…
borisbat b70a626
CMakeLists: enable dasPUGIXML by default
borisbat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| options gen2 | ||
| require dastest/testing_boost public | ||
|
|
||
| require daslib/fio | ||
| require daslib/module_path | ||
|
|
||
| [test] | ||
| def test_real_project_local_path_returns_baked_dir(t : T?) { | ||
| t |> run("real project-local path returns its dir_name") @(t : T?) { | ||
| // This test file is project-local (sits in tests/fio/, no /modules/ segment). | ||
| let real_baked = "{get_das_root()}/tests/fio/get_this_module_dir_resolver.das" | ||
| let dir = __builtin_resolve_this_module_dir(real_baked) | ||
| t |> equal(dir, "{get_das_root()}/tests/fio") | ||
| } | ||
|
borisbat marked this conversation as resolved.
|
||
| } | ||
|
|
||
| [test] | ||
| def test_nonexistent_project_local_falls_back_to_exe_dir(t : T?) { | ||
| t |> run("nonexistent project-local baked path falls back to an existing dir") @(t : T?) { | ||
| // No /modules/ segment AND dir doesn't exist on disk → should fall | ||
| // back to <exe_dir> rather than returning the dead path. Models the | ||
| // relocated-bundle scenario where main.das's dev-time dir is gone. | ||
| let dead = "/__no_such_dir_42__/__no_such_subdir__/main.das" | ||
| let dir = __builtin_resolve_this_module_dir(dead) | ||
| t |> success(dir != "/__no_such_dir_42__/__no_such_subdir__", | ||
| "must not return the dead baked dir, got '{dir}'") | ||
| t |> success(fexist(dir), "fallback dir '{dir}' must exist on disk") | ||
| } | ||
| } | ||
|
|
||
| [test] | ||
| def test_nonexistent_modules_path_keeps_baked(t : T?) { | ||
| t |> run("nonexistent /modules/ baked path returns baked dir unchanged") @(t : T?) { | ||
| // When rel is non-empty the new fallback does NOT fire — preserves | ||
| // existing tier-3 behavior for module paths so we don't accidentally | ||
| // mask a missing module with the exe dir. | ||
| let dead = "/__no_such_root__/modules/__no_such_module__/foo.das" | ||
| let dir = __builtin_resolve_this_module_dir(dead) | ||
| t |> equal(dir, "/__no_such_root__/modules/__no_such_module__") | ||
| } | ||
| } | ||
|
|
||
| [test] | ||
| def test_empty_baked_returns_empty(t : T?) { | ||
| t |> run("empty input returns empty") @(t : T?) { | ||
| t |> equal(__builtin_resolve_this_module_dir(""), "") | ||
| } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.