Add feature flagging system#1783
Open
HT154 wants to merge 1 commit into
Open
Conversation
HT154
force-pushed
the
feature-flags
branch
6 times, most recently
from
July 17, 2026 18:39
f7f0441 to
dd067c6
Compare
HT154
commented
Jul 17, 2026
Comment on lines
+129
to
+142
| /// Register external module readers. | ||
| /// | ||
| /// Added in Pkl 0.27.0. | ||
| externalModuleReaders: Mapping<String, ExternalReader>? | ||
|
|
||
| /// Register external resource readers. | ||
| /// | ||
| /// Added in Pkl 0.27.0. | ||
| externalResourceReaders: Mapping<String, ExternalReader>? | ||
|
|
||
| /// Dictates the rendering of calls to the trace() method within Pkl. | ||
| /// | ||
| /// Added in Pkl 0.30.0. | ||
| traceMode: ("compact" | "pretty")? |
Contributor
Author
There was a problem hiding this comment.
Whoops, we've missed updating this for a bit!
HT154
marked this pull request as ready for review
July 17, 2026 19:33
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.
Adds:
--feature=<name>=[true|false]pkl.EvaluatorSettings#featureFlags: Mapping<KnownFeatureFlags | String, Boolean>pkl.EvaluatorSettings#FeatureFlags = nothing(no feature flags yet, but this will be a string literal union)org.pkl.core.FeatureFlags- enum to document feature flags and their default values.org.pkl.core.evaluatorSettings.PklEvaluatorSettings.featureFlagsorg.pkl.core.Analyzernow requires constructor argumentMap<FeatureFlag, Boolean> featureFlagsorg.pkl.core.EvaluatorBuilderaddFeatureFlag,addFeatureFlags,setFeatureFlags,getFeatureFlagsapplyFromProject(Project, Logger)(for capturing string->FeatureFlagconversion warnings)Loggerargument now passesLoggers.noop()to this APIorg.pkl.config.java.ConfigEvaluatorBuilder.applyFromProject(Project, Logger)(for capturing string->FeatureFlagconversion warnings)Loggerargument now passesLoggers.noop()to this APIorg.pkl.core.Logger(changes to assist with warnings not from Pkl code)trace(String message, String frameUri)(now called bytrace(String, StackFrame))warn(String message, String frameUri)(now called bywarn(String, StackFrame))featureFlags(as aMapProperty<String, Boolean>)CreateEvaluatorRequestnow accepts a map propertyfeatureFlags, which is a map of string to boolean values.Feature flag lifecycle:
org.pkl.core.FeatureFlags.@Deprecatedfor at least one release to provide Java API users an opportunity to discontinue usage.Notably, because Pkl's stdlib is statically initialized with a separate
VmContext, it can set its own feature flags independently of each user-initiated evaluation!