--share option for hadrian doesn't work with hs-boot files

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

--share option for hadrian doesn't work with hs-boot files

Matthew Pickering
I have been trying the new `--share` option implemented in hadrian but I haven't actually managed to
complete any builds yet with it enabled after the initial one.

The current error is

```
<no location info>: error:
    ‘Var.AnonArgFlag’ is exported by the hs-boot file, but not exported by the module
Error when running Shake build system:
  at action, called at src/Rules.hs:35:19 in main:Rules
  at need, called at src/Rules.hs:52:5 in main:Rules
* Depends on: _build/stage0/bin/ghc
  at need, called at src/Utilities.hs:71:18 in main:Utilities
* Depends on: _build/stage0/compiler/build/libHSghc-8.9.a
  at need, called at src/Rules/Library.hs:118:5 in main:Rules.Library
* Depends on: _build/stage0/compiler/build/Var.o
* Raised the exception:
user error (Development.Shake.cmd, system command failed
```

I get this after building Simon's `FunTy` patch which does add this flag and the definition to `Var.hs-boot` and then switching back to master with the cache enabled.

Could you please write down some advice Andrey about how to solve issues like this? It seems very fragile making sure that every case is covered.

Cheers,

Matt

_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Reply | Threaded
Open this post in threaded view
|

RE: --share option for hadrian doesn't work with hs-boot files

Andrey Mokhov

Hi Matt,

 

Thanks! Switching branches that add/remove hs-boot files is exactly the kind of scenario which is hard to predict :)

 

This looks like a bug, so please create a ticket. If you manage to reproduce this somehow without switching branches, e.g. by just adding or removing an hs-boot file, that would make it easier to debug.

 

> Could you please write down some advice Andrey about

> how to solve issues like this? It seems very fragile making

> sure that every case is covered.

 

Shake 0.17.6 has the following two commands that may help to partially clean up the cache in presence of such bugs:

 

  --share-list                List the shared cache files.

  --share-remove[=SUBSTRING]  Remove the shared cache keys.

 

By running Hadrian with

 

--share-remove=_build/stage0/compiler/build/Var*

 

you should be able to evict the corresponding build rules from the cache and hopefully the build will go through. If this does help, please also mention this in the ticket.

 

Cheers,

Andrey

 

From: Matthew Pickering [mailto:[hidden email]]
Sent: 22 February 2019 08:53
To: GHC developers <[hidden email]>; Andrey Mokhov <[hidden email]>
Subject: --share option for hadrian doesn't work with hs-boot files

 

I have been trying the new `--share` option implemented in hadrian but I haven't actually managed to

complete any builds yet with it enabled after the initial one.

 

The current error is

 

```

<no location info>: error:
    ‘Var.AnonArgFlag’ is exported by the hs-boot file, but not exported by the module
Error when running Shake build system:
  at action, called at src/Rules.hs:35:19 in main:Rules
  at need, called at src/Rules.hs:52:5 in main:Rules
* Depends on: _build/stage0/bin/ghc
  at need, called at src/Utilities.hs:71:18 in main:Utilities
* Depends on: _build/stage0/compiler/build/libHSghc-8.9.a
  at need, called at src/Rules/Library.hs:118:5 in main:Rules.Library
* Depends on: _build/stage0/compiler/build/Var.o
* Raised the exception:
user error (Development.Shake.cmd, system command failed
```

 

I get this after building Simon's `FunTy` patch which does add this flag and the definition to `Var.hs-boot` and then switching back to master with the cache enabled.

 

Could you please write down some advice Andrey about how to solve issues like this? It seems very fragile making sure that every case is covered.

 

Cheers,

 

Matt


_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs