On Windows after I install the new cabal-install then when I do a cabal update it says there is a new ...

On Windows after I install the new cabal-install then when I do a cabal update it says there is a new cabal-install available. Yet cabal-install installed without any errors. Why do I get this message? -- -- Sent from an expensive device which will be obsolete in a few months! :D Casey

You probably don't have $APPDATA\cabal\bin on your PATH
On Sun, Jul 12, 2015 at 10:28 AM KC
On Windows after I install the new cabal-install then when I do a cabal update it says there is a new cabal-install available.
Yet cabal-install installed without any errors.
Why do I get this message?
-- --
Sent from an expensive device which will be obsolete in a few months! :D
Casey
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe

I have C:\Users\David\AppData\Roaming\cabal\bin on my path, and I have the
same problem. I think it's been that way for years.
On Sun, Jul 12, 2015 at 10:30 AM, Michael Snoyman
You probably don't have $APPDATA\cabal\bin on your PATH
On Sun, Jul 12, 2015 at 10:28 AM KC
wrote: On Windows after I install the new cabal-install then when I do a cabal update it says there is a new cabal-install available.
Yet cabal-install installed without any errors.
Why do I get this message?
-- --
Sent from an expensive device which will be obsolete in a few months! :D
Casey
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe

When you just run "cabal", it runs from some directory X; but it installs new cabal in some other directory Y. Sorry, I'm not an expert in Windows paths; but as of now you have two versions of cabal.exe installed: one old, which runs, and another, which is new. Отправлено с iPad
12 июля 2015 г., в 21:58, David Gladstein
написал(а): I have C:\Users\David\AppData\Roaming\cabal\bin on my path, and I have the same problem. I think it's been that way for years.
On Sun, Jul 12, 2015 at 10:30 AM, Michael Snoyman
wrote: You probably don't have $APPDATA\cabal\bin on your PATH On Sun, Jul 12, 2015 at 10:28 AM KC
wrote: On Windows after I install the new cabal-install then when I do a cabal update it says there is a new cabal-install available. Yet cabal-install installed without any errors.
Why do I get this message?
-- --
Sent from an expensive device which will be obsolete in a few months! :D
Casey
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe

Hi, David Gladstein wrote:
I have C:\Users\David\AppData\Roaming\cabal\bin on my path, and I have the same problem. I think it's been that way for years.
Make sure that the order of directories on the path is correct, so that the first cabal.exe found is the one installed by cabal itself. To check that it worked, run "cabal --version" and compare with the version number from the output of "cabal install cabal-install". Tillmann

The order of the paths matter, if the Haskell platform path is before the cabal one, any common programs will be shadowed. Run 'where.exe <program name>' to find out the path of the program that is first in line.
Niklas
----- Ursprungligt meddelande -----
Från: "David Gladstein"

On Windows the 'system' path variable always has precedence over the 'user'
path variable (see [1]). You will need to rename, delete, or overwrite the
version of cabal.exe installed globally for the one under %appdata% to be
used.
[1]: https://support.microsoft.com/en-us/kb/100843
On Sun, Jul 12, 2015 at 12:58 PM, David Gladstein
I have C:\Users\David\AppData\Roaming\cabal\bin on my path, and I have the same problem. I think it's been that way for years.
On Sun, Jul 12, 2015 at 10:30 AM, Michael Snoyman
wrote: You probably don't have $APPDATA\cabal\bin on your PATH
On Sun, Jul 12, 2015 at 10:28 AM KC
wrote: On Windows after I install the new cabal-install then when I do a cabal update it says there is a new cabal-install available.
Yet cabal-install installed without any errors.
Why do I get this message?
-- --
Sent from an expensive device which will be obsolete in a few months! :D
Casey
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
-- -- Michael Steele

2015-07-13 18:41 GMT+02:00 Michael Steele
On Windows the 'system' path variable always has precedence over the 'user' path variable (see [1]). You will need to rename, delete, or overwrite the version of cabal.exe installed globally for the one under %appdata% to be used.
To me that looks like a bug in the Haskell Platform installer: It puts the path to the tools shipped with the platform into the the system PATH and the path to the user-installed tools (i.e. the stuff below %APPDATA%) into the user part of the PATH. This way, you will always get the shipped alex/cabal/happy/HsColour, not the new stuff. This is a bit like putting e.g. /usr/bin before your $HOME/bin on *nices, which is exactly the wrong way round. Furthermore, I've just seen that there is a 'C:\Program Files\Haskell\bin' at the start of my system PATH, pointing to nowhere. Is this a remnant of former GHC/platform installations? No clue where this comes from...

I disagree that this is a bug or misfeature in the Haskell Platform. The
problem is caused by a quirk in how Windows works.
There are a few other options I didn't mention. One is to delete the global
entry from the 'system' path variable and insert it into the 'user' path
variable somewhere after the "%appdata%\cabal\bin" entry. The downside here
is that other user accounts will be affected. Another option is to use a
custom shortcut or execute a batch script which manually sets PATH
variables as needed. This is the method I use personally.
On Mon, Jul 13, 2015 at 10:01 AM, Sven Panne
2015-07-13 18:41 GMT+02:00 Michael Steele
: On Windows the 'system' path variable always has precedence over the 'user' path variable (see [1]). You will need to rename, delete, or overwrite the version of cabal.exe installed globally for the one under %appdata% to be used.
To me that looks like a bug in the Haskell Platform installer: It puts the path to the tools shipped with the platform into the the system PATH and the path to the user-installed tools (i.e. the stuff below %APPDATA%) into the user part of the PATH. This way, you will always get the shipped alex/cabal/happy/HsColour, not the new stuff. This is a bit like putting e.g. /usr/bin before your $HOME/bin on *nices, which is exactly the wrong way round.
Furthermore, I've just seen that there is a 'C:\Program Files\Haskell\bin' at the start of my system PATH, pointing to nowhere. Is this a remnant of former GHC/platform installations? No clue where this comes from...
-- -- Michael Steele

I created a Cabal variable with the path to cabal\bin in the system
variables area and than put that early in the Path variable
Cabal update now finds the new cabal-install
What are the pros and cons of doing this?
I have a feeling running batch scripts to set path variables might be
better to avoid long path variables and to inadvertently finding the wrong
files on long path variables.
I have also found that you want to install most/all programming platforms
outside of the Program Files folder which Windows has special protections
on.
--
--
Sent from an expensive device which will be obsolete in a few months! :D
Casey
On Jul 13, 2015 10:57 AM, "Michael Steele"
I disagree that this is a bug or misfeature in the Haskell Platform. The problem is caused by a quirk in how Windows works.
There are a few other options I didn't mention. One is to delete the global entry from the 'system' path variable and insert it into the 'user' path variable somewhere after the "%appdata%\cabal\bin" entry. The downside here is that other user accounts will be affected. Another option is to use a custom shortcut or execute a batch script which manually sets PATH variables as needed. This is the method I use personally.
On Mon, Jul 13, 2015 at 10:01 AM, Sven Panne
wrote: 2015-07-13 18:41 GMT+02:00 Michael Steele
: On Windows the 'system' path variable always has precedence over the 'user' path variable (see [1]). You will need to rename, delete, or overwrite the version of cabal.exe installed globally for the one under %appdata% to be used.
To me that looks like a bug in the Haskell Platform installer: It puts the path to the tools shipped with the platform into the the system PATH and the path to the user-installed tools (i.e. the stuff below %APPDATA%) into the user part of the PATH. This way, you will always get the shipped alex/cabal/happy/HsColour, not the new stuff. This is a bit like putting e.g. /usr/bin before your $HOME/bin on *nices, which is exactly the wrong way round.
Furthermore, I've just seen that there is a 'C:\Program Files\Haskell\bin' at the start of my system PATH, pointing to nowhere. Is this a remnant of former GHC/platform installations? No clue where this comes from...
-- -- Michael Steele

2015-07-13 19:57 GMT+02:00 Michael Steele
I disagree that this is a bug or misfeature in the Haskell Platform. The problem is caused by a quirk in how Windows works.
Hmmm, I think it can be argued that it*is* a bug/misfeature of the HP, because people are obviously confused by the status quo, see the OP. The whole idea behind the HP is giving people an easy and painless approach to installing a useful Haskell ecosystem. Granted, the fact that the user part of the PATH is appended to the system part (not *pre*pended) is exactly the wrong way round in Windows, but an out-of-the-box system like the HP should work around exactly such things, e.g. by setting user vars on the first run etc.
There are a few other options I didn't mention. One is to delete the global entry from the 'system' path variable and insert it into the 'user' path variable somewhere after the "%appdata%\cabal\bin" entry. The downside here is that other user accounts will be affected. Another option is to use a custom shortcut or execute a batch script which manually sets PATH variables as needed. This is the method I use personally.
Manually fiddling around with system settings/paths and reverting to manually written batch scripts should not be necessary. If we expect that from users, there's no point in having a HP. Don't get me wrong: Depending on your workflow, doing exactly what you described might be the right approach for power users, but that't not the target group.
participants (8)
-
David Gladstein
-
KC
-
Michael Snoyman
-
Michael Steele
-
MigMit
-
Niklas Larsson
-
Sven Panne
-
Tillmann Rendel