Coder Social home page Coder Social logo

filepattern's People

Contributors

eborden avatar ndmitchell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

filepattern's Issues

Figure out what to do with '.'

Currently when matching a FilePattern and FilePath, if there is a . in the FilePattern, that can either match a literal . in the FilePath, or be ignored. Conversely, every . in a FilePath must be matched explicitly or with something like * or **. That behaviour is confusing and weird. I see two sensible possible routes forward:

  1. Ignore all . paths in both FilePattern and FilePath.
  2. Declare that . has no special behaviour in either - it can be matched literally, but nothing else.

The concern with option 2 is that when walking a directory structure, . really does have no meaning, so it is a bit inconsistent. The concern with option 1 is that it's magic behaviour that isn't otherwise well founded. Thoughts? (CC @eborden and @snowleopard)

Figure out what absolute paths should match

The Shake paths, as per ndmitchell/shake#376, don't match absolute paths - so **/*.c will match test/foo.c but not /test/foo.c or C:/test/foo.c. While it's somewhat useful, it's highly inconsistent in the code, and requires deciding whether C:foo.c or /foo.c are relative or absolute on Windows (in truth they are bit of both...). My inclination is that when moving to a filepattern library that whole relative/absolute mess should be thrown out, and **/foo.c should be equivalent to takeFileName x == "foo.c", regardless of absolute vs relative.

My thoughts are that if people want to avoid matching relative paths in their Shake build system they can do:

priority 100 $ isAbsolute ?> \_ -> return ()

Namely add a rule with top priority that always matches absolute paths and doesn't build them.

I did a dummy removal of the absolute/relative stuff and a lot of tests got simpler, in particular those about walker and ?== correspondence, which certainly suggests it is the right semantics.

CC @eborden @ezyang @snowleopard

Release 0.1.0.0

Let's release filepattern on hackage. What is left to do?

@ndmitchell In this comment you mentioned wanting to make other changes. Could you enumerate them here so that they can be tackled?

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.