Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reenabled hinotify, follow-file and ztail #3507

Merged
merged 1 commit into from
Apr 9, 2018

Conversation

jchia
Copy link
Contributor

@jchia jchia commented Apr 9, 2018

Checklist:

  • Meaningful commit message - please not Update build-constraints.yml

  • At least 30 minutes have passed since Hackage upload

  • On your own machine, in a new directory, you have successfully run the following set of commands (replace $package with the name of the package that is submitted, $version is the version of the package you want to get into Stackage):

    stack unpack $package
    cd $package-$version
    stack init --resolver nightly
    stack build --resolver nightly --haddock --test --bench --no-run-benchmarks
    

@mihaimaruseac mihaimaruseac merged commit 13b8d93 into commercialhaskell:master Apr 9, 2018
@mihaimaruseac
Copy link
Contributor

Thank you

@mihaimaruseac
Copy link
Contributor

Unfortunately follow-file and ztail are still failing to build:

  • follow-file:
[1 of 1] Compiling System.File.Follow ( src/System/File/Follow.hs, dist/build/System/File/Follow.o )                                                                        [54/8623]

src/System/File/Follow.hs:70:75: error:
    • Couldn't match type ‘[Char]’ with ‘BS8.ByteString’
      Expected type: System.Posix.ByteString.FilePath.RawFilePath
        Actual type: FilePath
    • In the third argument of ‘addWatch’, namely
        ‘(toFilePath $ parent file)’
      In the expression:
        addWatch
          inotify [Modify, Create, Delete] (toFilePath $ parent file)
      In the expression:
        addWatch
          inotify [Modify, Create, Delete] (toFilePath $ parent file)
          $ \ e
              -> let isFile filePath = ...
                 in
                   case e of
                     Created {filePath}
                       | isFile filePath -> void $ runInBase go
                       | otherwise -> pure ()
                     Deleted {filePath}
                       | isFile filePath -> void $ runInBase stop
                       | otherwise -> pure ()
                     Modified {maybeFilePath}
                       | (isFile <$> maybeFilePath) == Just True -> void $ runInBase go
                       | otherwise -> pure ()
                     MovedIn {filePath}
                       | isFile filePath -> void $ runInBase go
                       | otherwise -> pure ()
                     MovedOut {filePath}
                       | isFile filePath -> void $ runInBase go
                       | otherwise -> pure ()
                     DeletedSelf -> error "containing folder deleted"
                     Unmounted -> error "containing folder unmounted"
                     QOverflow -> error "queue overflow"
                     _ -> pure ()
   |
70 |   liftBaseWith $ \runInBase -> addWatch inotify [Modify, Create, Delete] (toFilePath $ parent file) $ \e ->
   |                                                                           ^^^^^^^^^^^^^^^^^^^^^^^^
src/System/File/Follow.hs:73:40: error:
    • Couldn't match type ‘BS8.ByteString’ with ‘[Char]’
      Expected type: String
        Actual type: System.Posix.ByteString.FilePath.RawFilePath
    • In the first argument of ‘isFile’, namely ‘filePath’
      In the expression: isFile filePath
      In a stmt of a pattern guard for
                     a case alternative:
        isFile filePath
   |
73 |           Created {filePath}  | isFile filePath -> void $ runInBase go
   |                                        ^^^^^^^^

src/System/File/Follow.hs:75:40: error:
    • Couldn't match type ‘BS8.ByteString’ with ‘[Char]’
      Expected type: String
        Actual type: System.Posix.ByteString.FilePath.RawFilePath
    • In the first argument of ‘isFile’, namely ‘filePath’
      In the expression: isFile filePath
      In a stmt of a pattern guard for
                     a case alternative:
        isFile filePath
   |
75 |           Deleted {filePath}  | isFile filePath -> void $ runInBase stop
   |                                        ^^^^^^^^

src/System/File/Follow.hs:77:51: error:
    • Couldn't match type ‘BS8.ByteString’ with ‘[Char]’
      Expected type: Maybe String
        Actual type: Maybe System.Posix.ByteString.FilePath.RawFilePath
    • In the second argument of ‘(<$>)’, namely ‘maybeFilePath’
      In the first argument of ‘(==)’, namely
        ‘(isFile <$> maybeFilePath)’
      In the expression: (isFile <$> maybeFilePath) == Just True
   |
77 |           Modified {maybeFilePath}  | (isFile <$> maybeFilePath) == Just True -> void $ runInBase go
   |                                                   ^^^^^^^^^^^^^

src/System/File/Follow.hs:79:40: error:
    • Couldn't match type ‘BS8.ByteString’ with ‘[Char]’
      Expected type: String
        Actual type: System.Posix.ByteString.FilePath.RawFilePath
    • In the first argument of ‘isFile’, namely ‘filePath’
      In the expression: isFile filePath
      In a stmt of a pattern guard for
                     a case alternative:
        isFile filePath
   |
79 |           MovedIn {filePath}  | isFile filePath -> void $ runInBase go   |                                        ^^^^^^^^

src/System/File/Follow.hs:81:42: error:
    • Couldn't match type ‘BS8.ByteString’ with ‘[Char]’
      Expected type: String
        Actual type: System.Posix.ByteString.FilePath.RawFilePath
    • In the first argument of ‘isFile’, namely ‘filePath’
      In the expression: isFile filePath
      In a stmt of a pattern guard for
                     a case alternative:
        isFile filePath
   |
81 |           MovedOut {filePath}   | isFile filePath -> void $ runInBase go
   |                                          ^^^^^^^^
  • ztail:
[5 of 6] Compiling TailHandle       ( TailHandle.hs, dist/build/ztail/ztail-tmp/TailHandle.o )

TailHandle.hs:110:64: error:
    • Couldn't match type ‘BS.ByteString’ with ‘[Char]’
      Expected type: [Char]
        Actual type: System.Posix.ByteString.FilePath.RawFilePath
    • In the first argument of ‘notdot’, namely ‘f’
      In the expression: notdot f
      In a stmt of a pattern guard for
                     an equation for ‘sig’:
        notdot f
    |
110 |       sig (INotify.MovedOut { INotify.filePath = f }) | notdot f = Just $ SignalDelete f
    |                                                                ^

TailHandle.hs:110:88: error:
    • Couldn't match type ‘BS.ByteString’ with ‘[Char]’
      Expected type: String
        Actual type: System.Posix.ByteString.FilePath.RawFilePath
    • In the first argument of ‘SignalDelete’, namely ‘f’
      In the second argument of ‘($)’, namely ‘SignalDelete f’
      In the expression: Just $ SignalDelete f
    |
110 |       sig (INotify.MovedOut { INotify.filePath = f }) | notdot f = Just $ SignalDelete f
    |                                                                                        ^

TailHandle.hs:111:63: error:
    • Couldn't match type ‘BS.ByteString’ with ‘[Char]’
      Expected type: [Char]
        Actual type: System.Posix.ByteString.FilePath.RawFilePath
    • In the first argument of ‘notdot’, namely ‘f’
      In the expression: notdot f
      In a stmt of a pattern guard for
                     an equation for ‘sig’:
        notdot f
    |
111 |       sig (INotify.MovedIn { INotify.filePath = f }) | notdot f = Just $ SignalInsert f False
    |                                                               ^

TailHandle.hs:111:87: error:
    • Couldn't match type ‘BS.ByteString’ with ‘[Char]’
      Expected type: String
        Actual type: System.Posix.ByteString.FilePath.RawFilePath
    • In the first argument of ‘SignalInsert’, namely ‘f’
      In the second argument of ‘($)’, namely ‘SignalInsert f False’
      In the expression: Just $ SignalInsert f False
    |
111 |       sig (INotify.MovedIn { INotify.filePath = f }) | notdot f = Just $ SignalInsert f False
    |                                                                                       ^
TailHandle.hs:112:63: error:
    • Couldn't match type ‘BS.ByteString’ with ‘[Char]’
      Expected type: [Char]
        Actual type: System.Posix.ByteString.FilePath.RawFilePath
    • In the first argument of ‘notdot’, namely ‘f’
      In the expression: notdot f
      In a stmt of a pattern guard for
                     an equation for ‘sig’:
        notdot f
    |
112 |       sig (INotify.Created { INotify.filePath = f }) | notdot f = Just $ SignalInsert f True
    |                                                               ^

TailHandle.hs:112:87: error:
    • Couldn't match type ‘BS.ByteString’ with ‘[Char]’
      Expected type: String
        Actual type: System.Posix.ByteString.FilePath.RawFilePath
    • In the first argument of ‘SignalInsert’, namely ‘f’
      In the second argument of ‘($)’, namely ‘SignalInsert f True’
      In the expression: Just $ SignalInsert f True
    |
112 |       sig (INotify.Created { INotify.filePath = f }) | notdot f = Just $ SignalInsert f True
    |                                                                                       ^

TailHandle.hs:113:63: error:
    • Couldn't match type ‘BS.ByteString’ with ‘[Char]’
      Expected type: [Char]
        Actual type: System.Posix.ByteString.FilePath.RawFilePath
    • In the first argument of ‘notdot’, namely ‘f’
      In the expression: notdot f
      In a stmt of a pattern guard for
                     an equation for ‘sig’:
        notdot f
    |
113 |       sig (INotify.Deleted { INotify.filePath = f }) | notdot f = Just $ SignalDelete f
    |                                                               ^

TailHandle.hs:113:87: error:
    • Couldn't match type ‘BS.ByteString’ with ‘[Char]’
      Expected type: String
        Actual type: System.Posix.ByteString.FilePath.RawFilePath
    • In the first argument of ‘SignalDelete’, namely ‘f’
      In the second argument of ‘($)’, namely ‘SignalDelete f’
      In the expression: Just $ SignalDelete f
    |
113 |       sig (INotify.Deleted { INotify.filePath = f }) | notdot f = Just $ SignalDelete f
    |                                                                                       ^

TailHandle.hs:118:42: error:
    • Couldn't match type ‘[Char]’ with ‘BS.ByteString’
      Expected type: System.Posix.ByteString.FilePath.RawFilePath
        Actual type: FilePath
    • In the third argument of ‘INotify.addWatch’, namely ‘path’
      In the expression:
        INotify.addWatch inotify l path (mapM_ (throwTo tid) . sig)
      In an equation for ‘add’:
          add l = INotify.addWatch inotify l path (mapM_ (throwTo tid) . sig)
    |
118 |       add l = INotify.addWatch inotify l path (mapM_ (throwTo tid) . sig)
    |

mihaimaruseac added a commit that referenced this pull request Apr 9, 2018
@dylex
Copy link
Contributor

dylex commented Apr 10, 2018

hinotify seems to have switched from FilePath to RawFilePath. I've updated ztail to deal with this and will submit another PR to reenable.

mihaimaruseac added a commit that referenced this pull request Apr 10, 2018
@mihaimaruseac
Copy link
Contributor

Thank you; ztail works, I enabled it right now

mihaimaruseac added a commit that referenced this pull request Apr 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants