Skip to content

Gracefully handle obsolete migrations #296

Description

@nex3

The migrator is in a bit of a sticky place when it comes to migrations for (parse-time) behavior that has already changed in Dart Sass 2. Because the migrator uses Dart Sass as its parser, if Dart Sass starts to emit parse errors for a given deprecated syntax, new versions of the migrator won't be able to migrate it.

At the very least, we should mitigate this by having older migrations print messages directing users to the last version of the migrator that supported that migration. Ideally, we would do something even more clever like installing and running those older versions for a period of time after the breaking change lands (or just shipping them with the migrator). It's also possible that we could do some renaming and have multiple versions of the Sass parser coexist within the same process to continue supporting older migrations for a time.

We'll need to decide which approach to take and implement it before Dart Sass 2 releases.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions