error: [[commands]]: ghci cannot be set to both the `name` and the `command` attributes. Did you mean to use the `package` attribute?
But if I did name = "my-ghci" it would work, because the command ghci is provided by the included packagesFrom = [ config.devShells.haskell ]. So the assertion really bites me.
Alternatives tried
I've tried combinations:
package = "ghci"
doesn't work because package "ghci" not found. I don't have direct access to the package, because I don't have a reference to it, it's included in the haskell shell created by a library function.
Specifying only of command/name fails with either:
error: [[commands]]: some command is missing both a `name` or `package` attribute.
or
error: [[commands]]: ghci expected either a command or package attribute.
Finally, naming the command differently works like described above.
Why do I care?
because id like the command to appear in the nice menu.
Summary and realization
OK. I realized the problem. In my case the ghci command would overwrite the ghci command that's already in scope.
Ill close this issue as dumb. Open a new feature request for displaying in menu commands originating from packagesFrom (this ties to issue #311). Refer to here to show how naive solution fails.
Hey,
is this assertion really correct or needed?
How to reproduce
Because I have such a case:
First this results in error:
But if I did
name = "my-ghci"
it would work, because the commandghci
is provided by the includedpackagesFrom = [ config.devShells.haskell ]
. So the assertion really bites me.Alternatives tried
I've tried combinations:
doesn't work because
package "ghci" not found
. I don't have direct access to the package, because I don't have a reference to it, it's included in thehaskell
shell created by a library function.Specifying only of
command
/name
fails with either:or
Finally, naming the command differently works like described above.
Why do I care?
because id like the command to appear in the nice menu.
Summary and realization
OK. I realized the problem. In my case the
ghci
command would overwrite theghci
command that's already in scope. Ill close this issue as dumb. Open a new feature request for displaying in menu commands originating frompackagesFrom
(this ties to issue #311). Refer to here to show how naive solution fails.