Skip to content

Commit

Permalink
Interpreter doc: Remove an incorrect statement
Browse files Browse the repository at this point in the history
  • Loading branch information
harendra-kumar committed Aug 16, 2016
1 parent 3bd643b commit d412c37
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions doc/GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1692,9 +1692,6 @@ configuration is effective when running the script. Otherwise the script uses
the global project configuration specified in
`~/.stack/global-project/stack.yaml`.
You have the option to make the script independent of any configuration by
using the `-hide-all-packages` ghc options as describe below.
### Specifying interpreter options
The stack interpreter options comment must specify a single valid stack command
Expand Down

8 comments on commit d412c37

@sjakobi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The -hide-all-packages seems to work again. Can this commit be reverted?

@harendra-kumar
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was working even when I remove this statement :-) The point is that the script will not be "independent of any configuration" even with -hide-all-packages. It still depends on the global project config or the project config. For example if you change a package version (by adding an extra-dep) in the config it will affect the script.

@sjakobi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It still depends on the global project config or the project config. For example if you change a package version (by adding an extra-dep) in the config it will affect the script.

Ah, ok.

But -hide-all-packages still guarantees that no packages were omitted, right? I think that would still be a useful safeguard and should be documented.
(I can add a note to that effect)

@harendra-kumar
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is explained in writing independent and reliable scripts section somewhere down below.

@sjakobi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah great, it's here. (I forgot to look at the "latest" docs on haskellstack.org)

Reliable means the script will use exactly the same version of all packages every time it runs so that the script does not break by accidentally using incompatible package versions. To achieve that use an explicit --resolver stack option.

This doesn't seem quite right then as the resolver versions may still be overridden by extra-deps.

@harendra-kumar
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't that a bit odd that --resolver on command line will change the whole set of packages but still add the same extra-deps, which might make things terribly broken. Shouldn't it override everything?

So we will need something like --no-config --resolver then to make this statement true? And if this is true then what I removed will also be true, huh.

@sjakobi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't that a bit odd that --resolver on command line will change the whole set of packages but still add the same extra-deps, which might make things terribly broken. Shouldn't it override everything?

So we will need something like --no-config --resolver then to make this statement true? And if this is true then what I removed will also be true, huh.

I'm more in favor of changing the behavior of --resolver so it overrides extra-deps. I have opened #2238 for this a while ago. Let's discuss this further there.

@mgsloan
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't that a bit odd that --resolver on command line will change the whole set of packages but still add the same extra-deps, which might make things terribly broken. Shouldn't it override everything?

I think this is fine. If the packages are incompatible, it will tell you about it. It's weird but useful.

Please sign in to comment.