-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Missing definition in generated plutus.json file #1086
Comments
@Dodilanne thanks for reporting, I'll take a look |
KtorZ
added a commit
that referenced
this issue
Jan 30, 2025
This is to avoid pruning a definition which may end up needed later on. The issue can be seen when definition to a Pair is used *before* another Map definitions that uses this same Pair. Before this commit, the Map definition would simply remove the definition generated for the Pair, since it would be pointless (and it is a lot easier to generate those pointless definition than trying to remember we are currently generating definition for a Map). So now, we defer the removal of the orphan definition to after all defnitions have been generated by basically looking at a dependency graph. I _could have_ used pet-graph on this to solve it similar to how we do package dependencies; but given that we only really need to that for pairs, the problem is relatively simple to solve (though cumbersome since we need to traverse all defintions). Fixes #1086.
KtorZ
added a commit
that referenced
this issue
Jan 30, 2025
This is to avoid pruning a definition which may end up needed later on. The issue can be seen when definition to a Pair is used *before* another Map definitions that uses this same Pair. Before this commit, the Map definition would simply remove the definition generated for the Pair, since it would be pointless (and it is a lot easier to generate those pointless definition than trying to remember we are currently generating definition for a Map). So now, we defer the removal of the orphan definition to after all defnitions have been generated by basically looking at a dependency graph. I _could have_ used pet-graph on this to solve it similar to how we do package dependencies; but given that we only really need to that for pairs, the problem is relatively simple to solve (though cumbersome since we need to traverse all defintions). Fixes #1086.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What Git revision are you using?
aiken v1.1.10+b25afa2
What operating system are you using, and which version?
Describe what the problem is?
When creating a datum type containing an alias for a
Pair
and an associative list using the same type alias, only the schema definition for the associative list gets included in the generated blueprint when executingaiken build
.Example
When building this simple validator:
...the resulting schema for the datum fields is as follows:
...but there is no definition for the
MyPair
type, only for theList$MyPair
.Is this expected? I could infer the
MyPair
type from theList$MyPair
schema but it feels like a weird edge case.What should be the expected behavior?
I would expect all
$ref
paths to point to a schema definition.plutus.json
The text was updated successfully, but these errors were encountered: