ndmitchell / neil

General tools for Neil
Other
38 stars 16 forks source link

Errors in "docs" command #8

Closed nikita-volkov closed 9 years ago

nikita-volkov commented 9 years ago
huge-black-box-mac:stm-containers mojojojo$ neil docs --username=NikitaVolkov
Running Haddock for stm-containers-0.1.4...
Running hscolour for stm-containers-0.1.4...
Preprocessing library stm-containers-0.1.4...
Preprocessing library stm-containers-0.1.4...
Warning: The documentation for the following packages are not installed. No
links will be generated to these packages: base-prelude-0.1.6, focus-0.1.2,
hashable-1.2.2.0, loch-th-0.2.1, placeholders-0.1, text-1.2.0.0
Haddock coverage:
Warning: stm-containers-0.1.4:STMContainers.Prelude: Could not find documentation for exported module: Exports
  25% (  1 /  4) in 'STMContainers.Prelude'

library/STMContainers/WordArray/Indices.hs:47:11: Warning:
    In the use of ‘bitSize’
    (imported from STMContainers.Prelude, but defined in base:Data.Bits):
    Deprecated: "Use 'bitSizeMaybe' or 'finiteBitSize' instead"
  12% (  2 / 17) in 'STMContainers.WordArray.Indices'
  55% ( 12 / 22) in 'STMContainers.WordArray'
  42% (  5 / 12) in 'STMContainers.SizedArray'

library/STMContainers/HAMT/Level.hs:25:9: Warning:
    In the use of ‘bitSize’
    (imported from STMContainers.Prelude, but defined in base:Data.Bits):
    Deprecated: "Use 'bitSizeMaybe' or 'finiteBitSize' instead"
  14% (  1 /  7) in 'STMContainers.HAMT.Level'
   0% (  0 / 12) in 'STMContainers.HAMT.Nodes'
   0% (  0 /  9) in 'STMContainers.HAMT'
  91% ( 10 / 11) in 'STMContainers.Map'
  91% ( 10 / 11) in 'STMContainers.Set'
  91% ( 10 / 11) in 'STMContainers.Multimap'
  93% ( 14 / 15) in 'STMContainers.Bimap'
Warning: STMContainers.Map: could not find link destinations for:
    Data.Hashable.Class.Hashable Focus.StrategyM
Warning: STMContainers.Set: could not find link destinations for:
    Data.Hashable.Class.Hashable Focus.StrategyM
Warning: STMContainers.Multimap: could not find link destinations for:
    Data.Hashable.Class.Hashable Focus.StrategyM
Warning: STMContainers.Bimap: could not find link destinations for:
    Focus.StrategyM
Documentation created: dist/doc/html/stm-containers/stm-containers.txt
/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 1: syntax error: unexpected end of file
neil: Failed in system command: cp -R dist/doc/html/ "/var/folders/kt/99tg6_t506g5n9zkr3pm3wzm0000gn/T/extra73634303742/--docs

Tried on Mac and Linux - same thing.

ndmitchell commented 9 years ago

The issue was that my command assumed my conventions for writing name/version pairs (although I think most shell scripts I saw to do this task assumed roughly similar conventions). In particular, the version and name must be on one line, but you write:

name:
    stm-containers

I've generalised my code to cope with that, and I was able to generate docs for your package. New version released, neil-0.4, which should work.

nikita-volkov commented 9 years ago

I've tried your package again.

The 0.4 and 0.5 releases simply fail to build with the following:

Failed to install neil-0.4
Last 10 lines of the build log ( /Users/mojojojo/.cabal/logs/neil-0.4.log ):
[25 of 33] Compiling Paper.Graph      ( src/Paper/Graph.hs, dist/build/neil/neil-tmp/Paper/Graph.o )
[26 of 33] Compiling Paper.Util.FileData ( src/Paper/Util/FileData.hs, dist/build/neil/neil-tmp/Paper/Util/FileData.o )
[27 of 33] Compiling Paper.Haskell    ( src/Paper/Haskell.hs, dist/build/neil/neil-tmp/Paper/Haskell.o )
[28 of 33] Compiling Paper.Main       ( src/Paper/Main.hs, dist/build/neil/neil-tmp/Paper/Main.o )
[29 of 33] Compiling Arguments        ( src/Arguments.hs, dist/build/neil/neil-tmp/Arguments.o )
[30 of 33] Compiling Cabal            ( src/Cabal.hs, dist/build/neil/neil-tmp/Cabal.o )

src/Cabal.hs:43:12: Not in scope: ‘getDirectoryContentsRecursive’

src/Cabal.hs:97:18: Not in scope: ‘getDirectoryContentsRecursive’
cabal: Error: some packages failed to install:
neil-0.4 failed during the building phase. The exception was:
ExitFailure 1

The 0.6 builds fine, but the docs it uploads generate a "Page not found" error on Hackage.

ndmitchell commented 9 years ago

Yes, I put out 0.6 to fix the change in the extra package - use that and you should be fine. Have you uploaded the package to Hackage already? And made sure you haven't changed the version number in the .cabal file? You can only upload docs after uploading the package, or you get a page not found error.

nikita-volkov commented 9 years ago

Sure I did. For information, an alternative script uploaded the docs just fine.

ndmitchell commented 9 years ago

Weird. If it happens again, can you give me the full details of Page not found, including any URL it prints out. Can you also clarify if it's a case of uploading giving an error, or after uploading when viewing through the browser you've got an error.

Note that uploading docs again shouldn't be harmful, so if you want to give it a go, do let me know the results.

ndmitchell commented 9 years ago

Please reopen if you can reproduce it, otherwise marking closed for now.

nikita-volkov commented 9 years ago

Didn't notice your previous message.

I have just tried it again and it worked fine. I'll reopen if it pops up again.