Stylus 0.54: Recovering from a Failed Upgrade Due to Missing Import Errors
0 reputation · 16 Jan 2020, 18:20 UTC
Recovering from a Failed Stylus 0.54 Upgrade
When upgrading to Stylus 0.54, the default import resolution now throws an error if a referenced file is missing. This change improves safety but can break automated pipelines that previously ignored missing imports. Additionally, the behavior around circular imports is still unresolved: the current release throws an error, but documentation does not guarantee whether future releases will warn or allow them. These changes create a precise goal: to restore a build after an upgrade failure while maintaining project stability.
Given the constraints of missing file errors, potential circular import crashes, and the lack of glob support in @require, what strategies can developers employ to mitigate the impact of missing imports during an upgrade? How can circular imports be detected and resolved before they trigger build failures? What is the recommended approach to preserve build stability when upgrading to Stylus 0.54 in a large project with many dependencies?