Comments (6)
/cc'ing also @bgamari whom I help with rls mgmt, but who is ultimately the one in charge and spending his weekends with GHC 8 release managament... :-)
from directory.
@ndmitchell just to clarify, the semantic change you're complaining occured in the hackage-released v1.2.5 release, and would therefore constitute a PVP violation?
from directory.
@hvr - I tried 7.10 which seems to have 1.2.2.0 and it doesn't include the trailing slash. I tried 1.2.5.0 and it does. I'm not really complaining about PVP violations, more undocumented change that might or might not have been intentional. For info, I've fixed this in Shake with ndmitchell/shake@9f6f901.
from directory.
The change occurred in 1.2.3.0. It was not intentional.
The new implementation of canonicalizePath
makes use of makeAbsolute
, which uses normalise
to clean up the path. Hence, this is a manifestation of how normalise
currently works.
I'm not sure what's the "right" behavior for this, so I'll just revert to the old behavior.
(This change will also affect makeAbsolute
.)
from directory.
Specifically, what are you passing into normalise
? And does normalise
do anything other than make the drive upper case on Windows? If not, I'd be tempted to implement that as a Windows-only single tweak, rather than use normalise
, which is a big hammer which is a little dodgy at the best of times.
from directory.
It looks roughly like this:
makeAbsolute path = normalise . (</> path) <$> getCurrentDirectory
canonicalizePath path = normalise <$> (transform =<< makeAbsolute path)
where transform = {- platform-specific function -}
Besides uppercasing the drive letter, normalise
also removes redundant dots and slashes, and changes to the correct type of slash (Windows-only).
from directory.
Related Issues (20)
- Updating the CI and the cabal file HOT 2
- makeAbsolute ~ gives wrong path HOT 2
- Release for GHC 9.6.1 HOT 3
- TMPDIR environment variable not honoured on windows HOT 2
- Feature request: createLink HOT 1
- FR: a variant of getModificationTime that works on symlinks HOT 1
- Cabal file doesn't list install-includes HOT 3
- [Feature request] A way to copy a directory with metadata (and/or recursively) HOT 5
- directory bundled with GHC-9.6 is not safe (inferred) anymore. HOT 5
- Support filepath >= 1.5.0.0 and os-string
- Support Win32 2.14 HOT 5
- canonicalizePath regressed on Windows between directory-1.3.7.1 and directory-1.3.8.0 HOT 2
- Please revise `time` dependency to `< 1.15` HOT 1
- Support filepath 1.4.300.1 HOT 4
- Builds with allow-newer unnecessarily fail HOT 1
- on Windows, copyFile makes empty source and destination files when the source file is absent HOT 8
- FR: findExecutable "" should return Nothing, like on linux HOT 4
- `directory-1.3.8.3`: relax upper bound of dependency on `base` HOT 2
- Resolve TODO regarding AFPP support for openBinaryTempFile HOT 2
- Refactor remaining code to use *at APIs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from directory.