cnabio / cnab-to-oci

Tool to convert CNAB bundle.json to OCI index
Apache License 2.0
54 stars 41 forks source link

Introduce an event sink and improve fixup #25

Closed simonferquel closed 5 years ago

simonferquel commented 5 years ago

This introduce an event sink instead of logging everything to os.Stderr. The goal is for client code to control the rendering of events in a meaningfull way.

3 events are exposed:

The Client Code can choose the granularity of its display. The Progress snapshot exposes the whole graph of descriptor currently processed by the fixup logic.

Example of rich output that can be done: cnab-to-oci-out

simonferquel commented 5 years ago

Squashed & cleaned-up a bit the fixup logic @silvin-lubecki @ijc PTAL

ijc commented 5 years ago

@simonferquel you've ended up commiting a file called nul here again...

simonferquel commented 5 years ago

Yes, don't know why, anytime I run the e2e tests locally, I get this file created and my reflex of doing git add . && git commit --sm "blabla" makes it appear againg and again...

ijc commented 5 years ago

nul is the windows equivalent of /dev/null I suppose? I wonder if it is the value of ioutil.Discard on Windows (devnull(0)) or something?

simonferquel commented 5 years ago

@chris-crone @ijc I'll wait for your feedback to squash / remove the nul file

simonferquel commented 5 years ago

Just squashed (and removed the nul file). Waiting for @chris-crone GO to merge.