Open chris-dura opened 3 months ago
Yeah this is probably due to v4 using async a lot more, I've had to tackle other issues before where logs were ordered awkwardly.
I am kinda weirded out by the fact that this doesn't seem to just be the "ordering", it seems like the filtered warnings are categorized for the wrong output run as well, which is arguably worse than just messing up the order.
If someone wants to investigate, feel free! Since it's not that urgent I don't see this making it to the top of my prio list anytime soon.
Relevant files:
It seems to me that we're not storing any of the errors/warnings in the groupMessages util in a way where we namespace/key them. For most errors/warnings we have to probably namespace them by platform name, for filtered out refs we also have to namespace them by ${format}+${destination}
(note that destination is optional prop). Then we can assure that we're grabbing the relevant logs for the current platform or output.
Amount of work is medium I think, complexity fairly low (in case someone is looking to pick it up).
I am seeing some odd behavior in the log messages that was very confusing, and may have caused me to chase a red herring.
getReferences
all.css
builds without issue and awarning
is displayed when buildingfiltered.css
Output:
Now, I've decided that I don't want ALL tokens in
all.css
, I actually just want to filter out some component tokens, so I apply a filter to that file as well...However, now when I run a build, the logging message seems inaccurate...
all.css
, however, the filter I applied should NOT have filtered any tokens outcolors.red
, however, those references should only be missing in thefiltered.css
, not theall.css
all.css
andfiltered.css
were built and output properly, I'm just concerned about the warnings being incorrect... I'm migrating a VERY complex sd@v3 setup, so I really hope I'm not just missing something simple, but if the logging messages can potentially point me to the wrong file, that will make debugging the migration almost impossible for me :/
I'm wondering if there's an async issue, where the
all.css
file is still "building" at the point we throw the warning forfiltered.css
, and SD improperly associates the filtered reference warning with theall.css
file?