[Hackage] #794: Wildcards in data-files don't work with filenames containing multiple dots

#794: Wildcards in data-files don't work with filenames containing multiple dots ----------------------------+----------------------------------------------- Reporter: guest | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.8.0.2 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- The Hoogle cabal file reads: {{{ data-files: resources/*.js -- surely a Cabal bug that this isn't picked up by *.js -- but that hoogle.js is matched resources/jquery-1.4.2.js resources/jquery.cookie.js }}} It seems that the filename {{{a.b.ext}}} doesn't get picked by the wildcard {{{*.ext}}}. -- Neil Mitchell -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/794 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#794: Wildcards in data-files don't work with filenames containing multiple dots ----------------------------+----------------------------------------------- Reporter: guest | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.8.0.2 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Comment(by duncan): From the user guide: A limited form of * wildcards in file names, for example data-files: images/*.png matches all the .png files in the images directory. The limitation is that * wildcards are only allowed in place of the file name, not in the directory name or file extension. In particular, wildcards do not include directories contents recursively. Furthermore, if a wildcard is used it must be used with an extension, so data-files: data/* is not allowed. When matching a wildcard plus extension, a file's full extension must match exactly, so *.gz matches foo.gz but not foo.tar.gz. A wildcard that does not match any files is an error. So currently this is deliberate, that "*.gz matches foo.gz but not foo.tar.gz". It has the unfortunate side effect that "*.js" does not match "jquery-1.4.2.js". In this case "1.4.2" is not really a bunch of extensions but part of the name. On the other hand, "jquery.cookie.js" is exactly the sort of thing the test is there to avoid. Perhaps it's not a problem at all and the behavior should be reversed. Are there any cases anyone can think of where it would be misleading/dangerous, where a wildcard would accidentally pick up more files than was really intended (especially e.g. generated/temp files). -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/794#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#794: Wildcards in data-files don't work with filenames containing multiple dots ----------------------------+----------------------------------------------- Reporter: guest | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.8.0.2 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Comment(by guest): Many of those restrictions seem reasonable. I think the only one I'd change is that *.ext means all files ending ".ext", not all files ending ".ext" that don't have a '.' in the filename. I understand the desire about foo.gz, but who would expect *.gz not to match foo.tar.gz? That seems completely counter intuitive. -- Neil -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/794#comment:2 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#794: Wildcards in data-files don't work with filenames containing multiple dots ----------------------------+----------------------------------------------- Reporter: guest | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.8.0.2 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Comment(by guest): Btw, jquery.cookie.js is a standard .js file, and if you asked for it's extension I would describe it has having extension .js. jquery files are often named with jquery.nameofthething.js for extensions. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/794#comment:3 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#794: Wildcards in data-files don't work with filenames containing multiple dots ----------------------------+----------------------------------------------- Reporter: guest | Owner: Type: defect | Status: new Priority: normal | Milestone: Cabal-1.12 Component: Cabal library | Version: 1.8.0.2 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Changes (by duncan): * milestone: => Cabal-1.12 Comment: Mm, I'll consider changing it for the next major version (perhaps only with a change in the "cabal-version" field, so we do not change the behavior of older packages). See also #722. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/794#comment:4 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage