FastfileParser should implement a `.to_json` method.
minuscorp opened this issue · comments
Title says it all.
What for? :)
So for peeking Fastfile
configurations to the front-end, now I have to generate a custom json from the FastfileParser
(such as sanitizing lanes with no platform, or functions being declared out of platform scope, pure ruby methods, etc). And pass it to the front end.
Wouldn't parser.all_lanes_flat.to_json
be enough?
Except from when the platform is nil
, that should've replaced for some recognizable key (for now I'm using :no_platform
when platform is nil
.
all_lanes_flat
seems to be able to ignore actions out of a platform scope, but I don't know if that's something it should be like that (are we allowing to run lanes out of platform in CI?)