Replace JSON config with Hack configuration #423
Replies: 3 comments 7 replies
-
@azjezz has the concrete suggestion of generating executables. I like this overall. My only major concern is that I don't want |
Beta Was this translation helpful? Give feedback.
-
This is a double edged sword. Yes, it is great to have the typechecker check that you didn't typo a classname. But this causes a BC headache for libraries that have a large hhvm version support going. Enabling a linter that only exists on 4.145+ (f.e. HHClientLinter) requires mentioning it by name. This effectively forces the library to drop support for older hhvm versions. If the configuration was outside of the view of the typechecker, one would be able to mention a linter by name, without requiring that this linter be present on older builds. |
Beta Was this translation helpful? Give feedback.
-
If we end up going with the Hack code that instructs a codegen to build out a new EntryPoint way of configuring hhast, will the codegenned EntryPoint be mostly plain old data or will this EntryPoint evaluate a lot of predicates? I would be in favor of having the EntryPoint be the equivalent of a lock file with loads of plain old data. |
Beta Was this translation helpful? Give feedback.
-
Copying from #287 (comment)
--
There's a suggestion to replace the JSON configuration files with executable Hack configurations. This would:
--
For context: we use plain data configuration because originally the configuration was much simpler: you just provided a path.
We specifically use JSON because it's the best data format with builtin serialization/deserialization support.
Beta Was this translation helpful? Give feedback.
All reactions