Support scheme-agnostic projects (#486)

This adds changes to support loading project dependencies in non-file based projects.

The design for this feature can be found in SPICE-0005: https://github.com/apple/pkl-evolution/pull/6

Changes:
* Consider all imports prefixed with `@` as dependency notation.
* Bugfix: fix resolution of glob expressions in a local dependency.
* Adjust pkl.Project:
  - Allow local dependencies from a scheme-local paths.
  - Disallow certain evaluator settings if not loaded as a file-based module.
* Breaking API change: `ProjectDependenciesManager` constructor now requires `ModuleResolver` and `SecurityManager`.
This commit is contained in:
Daniel Chao
2024-06-04 16:52:20 -07:00
committed by GitHub
parent c0a7080287
commit d5ba8fa736
49 changed files with 764 additions and 235 deletions

View File

@@ -478,7 +478,7 @@ class EmbeddedExecutorTest {
)
val result = executor.evaluatePath(pklFile) {
allowedModules("file:", "package:", "projectpackage:", "https:")
allowedResources("prop:", "package:", "projectpackage:", "https:")
allowedResources("file:", "prop:", "package:", "projectpackage:", "https:")
moduleCacheDir(cacheDir)
projectDir(projectDir)
}