You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I can see, it is not possible to access the Elm.Project.Project/ElmJsonKey using a ContextCreator or any other method.
First, is this intentional somehow? Converting it to a project rule seems easy enough (and the result is probably nicer anyway).
And if not, should we add the phantom field in v3? Or would it be nicer to introduce something like withElmJson etc for the ContextCreator?
Edit: I can see that the current implementation of fromModuleRuleSchema would not allow the first suggested change easily. I'll try to poke a bit to see if this is necessary.
The text was updated successfully, but these errors were encountered:
lue-bird
changed the title
Question about Review.Rule.newModuleRuleSchemaUsingContextCreator and
Question about Review.Rule.newModuleRuleSchemaUsingContextCreatorSep 24, 2023
This is intentional yes, people should write a project rule instead. I usually remember the reason, but for some reason I can't put my finger on it now 😥
Review.Rule.newModuleRuleSchema
allows adding for example awithElmJsonModuleVisitor
.However,
newModuleRuleSchemaUsingContextCreator
cannot be used with that visitor because the resulting schema doesn't have the phantom fieldcanCollectProjectData : ()
.As far as I can see, it is not possible to access the
Elm.Project.Project
/ElmJsonKey
using aContextCreator
or any other method.First, is this intentional somehow? Converting it to a project rule seems easy enough (and the result is probably nicer anyway).
And if not, should we add the phantom field in v3? Or would it be nicer to introduce something like
withElmJson
etc for theContextCreator
?The text was updated successfully, but these errors were encountered: