Giter Site home page Giter Site logo

Comments (6)

hvr avatar hvr commented on August 15, 2024

/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.

hvr avatar hvr commented on August 15, 2024

@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.

ndmitchell avatar ndmitchell commented on August 15, 2024

@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.

Rufflewind avatar Rufflewind commented on August 15, 2024

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.

ndmitchell avatar ndmitchell commented on August 15, 2024

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.

Rufflewind avatar Rufflewind commented on August 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.