Lyricdev
GitHub

LYR-MIG0101

a module named otherwise by its header

hint · spec 14-cli

A note of lyric fix --from-4: a Lyric 4 module's module header gave it a name other than its path does. The header goes; Lyric 5 names the module by its path, and the package's own imports of it are rewritten to that name.

Explanation

In Lyric 4 a module could be called what its header said; in Lyric 5 a module is named by its package and its path under src/ — app.util for src/util.lyr in the package app. The migration removes every header and rewrites the package's own imports. Another package that imported the module by its old name has to name it anew.

Rename the file where the old name was the better one, or change the imports elsewhere.

Example

proposal[LYR-MIG0101] src/util.lyr:1:1: the module was named 'helpers' by its header; Lyric 5 names it by its path, 'util' — the package's own imports of it are rewritten; another package that imports it names it anew