Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
Source project has a limited visibility.
  • Rodrigo Mesquita's avatar
    f158a8d0
    Improve error message when reading invalid `.target` files · f158a8d0
    Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
    A `.target` file generated by ghc-toolchain or by configure can become
    invalid if the target representation (`Toolchain.Target`) is changed
    while the files are not re-generated by calling `./configure` or
    `ghc-toolchain` again. There is also the issue of hadrian caching the
    dependencies on `.target` files, which makes parsing fail when reading
    reading the cached value if the representation has been updated.
    
    This patch provides a better error message in both situations, moving
    away from a terrible `Prelude.read: no parse` error that you would get
    otherwise.
    
    Fixes #24199
    f158a8d0
    History
    Improve error message when reading invalid `.target` files
    Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
    A `.target` file generated by ghc-toolchain or by configure can become
    invalid if the target representation (`Toolchain.Target`) is changed
    while the files are not re-generated by calling `./configure` or
    `ghc-toolchain` again. There is also the issue of hadrian caching the
    dependencies on `.target` files, which makes parsing fail when reading
    reading the cached value if the representation has been updated.
    
    This patch provides a better error message in both situations, moving
    away from a terrible `Prelude.read: no parse` error that you would get
    otherwise.
    
    Fixes #24199
Code owners
Assign users and groups as approvers for specific file changes. Learn more.