Expose all functions by default in decision service #777
+18
−21
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.
Summary
Changes the decision service to expose all functions from L4 files, not just those with explicit
@exportmarkers. This aligns the decision service behavior with the core library.Motivation
Previously, the decision service required explicit
@exportannotations to expose functions via the REST API. This was inconsistent with the core library (L4.Export), which exposes the topmost function as default when no@exportmarkers are present.This created a barrier for users getting started with L4 - they had to learn about
@exportannotations before their functions would be accessible through the API.Changes
explicitExportsOnlyfilter injl4-decision-service/src/Examples.hsgetExportedFunctionsdirectly fromL4.Export@exportmarkers exist: exposes topmost function as default@exportmarkers exist but no default: marks topmost as defaultL4.Annotation,DescFlags,ParsedDesc)Behavior
Before:
Result: No functions exposed via API ❌
After:
Result:
squareexposed as default function ✅Testing
cabal build jl4-decision-service)@exportmarkersImpact
@exportwork as before)