mirror of
https://github.com/apple/pkl.git
synced 2026-01-11 14:20:35 +01:00
[PR #948] [MERGED] Improve handling of errors when analysis fails #823
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/948
Author: @bioball
Created: 2/12/2025
Status: ✅ Merged
Merged: 2/13/2025
Merged by: @bioball
Base:
main← Head:improve-analyze-import-errors📝 Commits (3)
5db648fImprove handling of errors when analysis failsaa145bcAddress review feedback7738181Run spotless apply📊 Changes
9 files changed (+127 additions, -57 deletions)
View changed files
📝
pkl-core/src/main/java/org/pkl/core/Analyzer.java(+1 -3)📝
pkl-core/src/main/java/org/pkl/core/runtime/VmImportAnalyzer.java(+84 -47)📝
pkl-core/src/main/java/org/pkl/core/stdlib/analyze/AnalyzeNodes.java(+2 -7)➕
pkl-core/src/test/files/LanguageSnippetTests/input-helper/analyze/cannotFindModule.pkl(+1 -0)➕
pkl-core/src/test/files/LanguageSnippetTests/input-helper/analyze/invalidGlob.pkl(+1 -0)➕
pkl-core/src/test/files/LanguageSnippetTests/input/errors/analyzeImportsCannotFindModule.pkl(+5 -0)➕
pkl-core/src/test/files/LanguageSnippetTests/input/errors/analyzeImportsInvalidGlob.pkl(+5 -0)➕
pkl-core/src/test/files/LanguageSnippetTests/output/errors/analyzeImportsCannotFindModule.err(+14 -0)➕
pkl-core/src/test/files/LanguageSnippetTests/output/errors/analyzeImportsInvalidGlob.err(+14 -0)📄 Description
Modules that cannot be loaded for one reason or another will now include the offending import as part of the stack trace, with a clear error message.
Before:
After:
Closes https://github.com/apple/pkl/pull/949
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.