Giter Club home page Giter Club logo

feedback's Issues

Is Windows supported?

I can build feedback.exe, but it does not seem to be functional: feedback --help just freezes.

Init script

Often part of the feedback loop really only has to be run once before the loop starts. It would be nice if we could specify that in the loop.

Timestamps do not account for time zone

putTimedChunks terminalCapabilities chunks = do
now <- getCurrentTime
let timeChunk = fore yellow $ chunk $ T.pack $ formatTime defaultTimeLocale "%H:%M:%S" now
putChunksWith terminalCapabilities $ timeChunk : " " : chunks ++ ["\n"]

I've been a bit confused by timestamps, referring far in the past. The thing is that getCurrentTime returns UTCTime and does not account for local time zone. I'm not sure, but maybe getZonedTime is a better default?

Different behaviour with nix develop --command in file vs cli

This works as expected:

feedback -- nix develop --command "cabal test all"

However,

loops:
  dev: nix develop --command "cabal test all"

followed by

feedback dev

results in

16:39:18 starting   nix develop --command "cabal test all"
/tmp/nix-shell.XMvQzr: line 1679: exec: cabal test all: not found

`feedback -- cabal test` fails

feedback -- cabal test fails pretty much on any project with

16:07:06 starting   cabal test
Resolving dependencies...
Build profile: -w ghc-9.2.2 -O1
In order, the following will be built (use -v for more details):
 - zlib-0.6.2.3 (lib) (first run)
 - zlib-0.6.2.3 (test:tests) (first run)
cabal: Failed to build zlib-0.6.2.3 (which is required by test:tests from
zlib-0.6.2.3). The failure occurred during the configure step. The exception
was:
/Users/andrew/.ghcup/bin/cabal-3.6.2.0: createProcess: dup2: invalid argument
(Bad file descriptor)

16:07:08 exited:    failed: 1
16:07:08 took       2.07s

Running cabal test itself succeeds without surprises. I'm on Mac.

Any idea what's wrong here? Happy to redirect this to cabal team, if you think the issue is on their side.

kill signal for server process in `loop`

Thanks for this great program.

I have a feedback.yaml, and have defined a loop: https://github.com/peterbecich/halogen-chess/blob/8ec3f53991e529b44b5bfd78889e0fa91f4b6a93/feedback.yaml#L15

It runs a program halogen-chess which binds to port 8080.

The loop runs once successfully.
When the loop restarts, I see an error:

halogen-chess: Network.Socket.bind: resource busy (Address already in use)

The issue is solved by exiting feedback, which kills the halogen-chess process bound to port 8080.

Could feedback send a different kill signal to the process, when the loop is repeated, to solve this issue?

An alternative solution may be a before-all hook, such as:

    hooks:
      before-all:
        kill -9 $(lsof -t -i:8080 -sTCP:LISTEN);

Darwin build fails

Hi! I was interested in the project so I tried nix-build on aarch64-darwin. Got this:

log
@nix { "action": "setPhase", "phase": "setupCompilerEnvironmentPhase" }
setupCompilerEnvironmentPhase
Build with /nix/store/2v8rkh9smb4ivx44wy4d6wjlrvzy2c01-ghc-8.10.7.
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/sk0qwac48yq9qfj5wi2c2vhcij3sg7df-source
source root is source
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "compileBuildDriverPhase" }
compileBuildDriverPhase
setupCompileFlags: -package-db=/private/tmp/nix-build-feedback-0.0.0.0.drv-0/setup-package.conf.d -j10 -threaded -rtsopts
[1 of 1] Compiling Main             ( /nix/store/4mdp8nhyfddh7bllbi7xszz7k9955n79-Setup.hs, /private/tmp/nix-build-feedback-0.0.0.0.drv-0/Main.o )
Linking Setup ...
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
configureFlags: --verbose --prefix=/nix/store/y9vq1gsb6y73dbhyiyrvmallg7zvcnfi-feedback-0.0.0.0 --libdir=$prefix/lib/$compiler --libsubdir=$abi/$libname --with-gcc=clang --package-db=/private/tmp/nix-build-feedback-0.0.0.0.drv-0/package.conf.d --ghc-options=-j10 --disable-split-objs --disable-library-profiling --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --disable-tests --enable-benchmarks --enable-library-vanilla --disable-library-for-ghci --ghc-options=-O2 --ghc-options=-Wall --ghc-options=-Wincomplete-uni-patterns --ghc-options=-Wincomplete-record-updates --ghc-options=-Wpartial-fields --ghc-options=-Widentities --ghc-options=-Wredundant-constraints --ghc-options=-Wcpp-undef --ghc-options=-Werror --extra-include-dirs=/nix/store/0hx0r0psj5lixjmcr5dkmba5yfkcm8rf-libcxx-11.1.0-dev/include --extra-lib-dirs=/nix/store/s4i5sr9d2jnpmhm842kwmn09l674d1lx-libcxx-11.1.0/lib --extra-include-dirs=/nix/store/r5vchjr674y1g5wwd4zi1ljb91yarl6a-libcxxabi-11.1.0-dev/include --extra-lib-dirs=/nix/store/9p103zw1c1n2g9vlkv5sggv79rqg10x6-libcxxabi-11.1.0/lib --extra-lib-dirs=/nix/store/dgzlss0f83csps869x3sykb319w1qj37-compiler-rt-libc-11.1.0/lib --extra-lib-dirs=/nix/store/yka1ycs21f8h79djbhfimzp4dr6jrjp0-ncurses-6.2/lib --extra-lib-dirs=/nix/store/iqi68s822hhx9kn0svk8c9a0gl43qn5r-libffi-3.4.2/lib --extra-lib-dirs=/nix/store/msh8r38sk53acf1f695hmr1042pwyz8m-gmp-6.2.1/lib --extra-include-dirs=/nix/store/ldx1rjq5n2fb7kscvrq4sx856addb40c-libiconv-50/include --extra-lib-dirs=/nix/store/ldx1rjq5n2fb7kscvrq4sx856addb40c-libiconv-50/lib --extra-framework-dirs=/nix/store/6vw4xdh1v8mnqdiz9yjzpkbsxqz7dm39-apple-framework-Cocoa-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/4n1srw1nziv2lb2fy4s32ilaajimidis-apple-framework-AppKit-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/z5slrpvy8brdb8c5zkdyb231lyc94bzc-apple-framework-ApplicationServices-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/6ajnpkr11fg0s548bb0b7n9lb2x298qc-apple-framework-ColorSync-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/gdgy5syvkxya3b3hrf6q5shs7f14wxcc-apple-framework-CoreGraphics-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/zz4lymawlfd5vjbkxb9r8w154jqfl1cc-apple-framework-Accelerate-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/cjd72xdr6v7z2xksbhl9q9ywmhvcfxjl-apple-framework-CoreWLAN-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/ar07gjmimjh7k07hrazcrlzh01i2vrx5-apple-framework-SecurityFoundation-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/kmvzyimdqh070r1q0pns46sblgcrk4xy-apple-framework-Security-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/8ysr1pq44dfxbb2m0zz6ax7fzkvrx5zc-apple-framework-IOKit-11.0.0/Library/Frameworks --extra-include-dirs=/nix/store/0wdxl81sn2rwqxidnnjlwhrwh0ldm59a-apple-lib-libDER/include --extra-framework-dirs=/nix/store/j3b0fzxrjg912w2y3via11z3y8h0gdk2-apple-framework-IOBluetooth-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/gyafs9f0yvgkjhajnr14xvgq612wq8k4-apple-framework-CoreBluetooth-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/d5np8y2d44r391ppxydxrga5mj1r4yy3-apple-framework-IOSurface-11.0.0/Library/Frameworks --extra-include-dirs=/nix/store/dfzcffakhlrc2rmc9c1wrincnb50f4bw-apple-lib-xpc/include --extra-framework-dirs=/nix/store/kiypvl9iqswwznn4bhln4yildss3d5c1-apple-framework-SystemConfiguration-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/i3ca9mnbz80iwp8w853xp64r5kq4hd6g-apple-framework-CoreServices-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/ixwjr2a5ygaan33gl4jh2al4m60rfgjf-apple-framework-CFNetwork-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/z8dpw9n0xvgjdn00m3h440x6f8z8q3ky-apple-framework-CoreAudio-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/2rma3hpdam89sg4160i4hwjcij683db3-apple-framework-CoreAudioTypes-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/36cw9s7j74gqg54br29n23l360bhfih9-apple-framework-CoreData-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/av2214mgxfd12wsi84fxakg0whfkyn9d-apple-framework-CloudKit-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/c4rkjlwn704g8aqi9q6x46d05mhfvynj-apple-framework-CoreLocation-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/1fyc12hjlqql5qmj4md8161wwxk6sb29-apple-framework-CoreFoundation-11.0.0/Library/Frameworks --extra-include-dirs=/nix/store/z2lz6f7b5qhgj7psiig11jyqwaxm4zai-libobjc-11.0.0/include --extra-lib-dirs=/nix/store/z2lz6f7b5qhgj7psiig11jyqwaxm4zai-libobjc-11.0.0/lib --extra-framework-dirs=/nix/store/lx338wfxh5raqb3c87m9a2is7qi7w6xa-apple-framework-DiskArbitration-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/aid53nm558i3wr07iwzk8rhkq2ap5zv1-apple-framework-NetFS-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/i8cjbs92lyl3rw4law8gkl508qzgsvv5-apple-framework-OpenDirectory-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/xncg69d61ki80wzd7rbxbmg5phlighrj-apple-framework-ServiceManagement-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/i395k3x51f0qnwv3galk070dmbdmcvad-apple-framework-CoreText-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/zviw0wj7fwas6316jy673pyw24ppygzm-apple-framework-ImageIO-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/g2rq5yf1jn0y5jyv7nv74l2pw7v6kbqg-apple-framework-AudioToolbox-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/g3garhp644kxfpkjvlcq2k73i0vqpi7k-apple-private-framework-AudioToolboxCore-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/qjkgsdsfz271f9pd3j24pmd74bclld70-apple-framework-CoreMIDI-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/xbl7s6ijs8pgbcj7j0k99fizxd9ykh8l-apple-framework-AudioUnit-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/yyil8rf3dq275ybv3ax7lazrfj4skfyy-apple-framework-Carbon-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/ygx7lvr28xakdplnkwcdvy1sd00fijy6-apple-framework-Foundation-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/dpsxj77pd2mg8xi5m1s9yk6vz7za0cfi-apple-framework-QuartzCore-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/mc2sk58vavyz6x9mmxwdqja94g3b6wj4-apple-framework-CoreImage-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/kdxcd881i3vwkwm9xib7wzmi0asl01dx-apple-framework-CoreVideo-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/4b1i4ih2izrn2017irk4jpps4waik5bh-apple-framework-OpenGL-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/d1s14xfdyl4a5igkiamxypgl097abyp8-apple-framework-Metal-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/fmksawvk0mxwz098gm997p7jkkwn5myw-apple-framework-OpenCL-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/5wv16dz10j39h7wqvz3zvvb7ff6haz6c-apple-private-framework-UIFoundation-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/0x9a5qdrzh2c17nbbd6wdpkrp1pywd2v-apple-framework-CoreFoundation-11.0.0/Library/Frameworks --extra-include-dirs=/nix/store/d8cwqaihldc3zkjm91ygh1i98bxlmy4r-libobjc-11.0.0/include --extra-lib-dirs=/nix/store/d8cwqaihldc3zkjm91ygh1i98bxlmy4r-libobjc-11.0.0/lib
Using Parsec parser
Configuring feedback-0.0.0.0...
Dependency autodocodec -any: using autodocodec-0.0.1.0
Dependency autodocodec-yaml -any: using autodocodec-yaml-0.1.0.1
Dependency base >=4.7 && <5: using base-4.14.3.0
Dependency conduit -any: using conduit-1.3.4.2
Dependency containers -any: using containers-0.6.5.1
Dependency envparse -any: using envparse-0.4.1
Dependency fsnotify -any: using fsnotify-0.3.0.1
Dependency optparse-applicative -any: using optparse-applicative-0.16.1.0
Dependency path -any: using path-0.8.0
Dependency path-io -any: using path-io-1.6.3
Dependency pretty-show -any: using pretty-show-1.10
Dependency safe-coloured-text -any: using safe-coloured-text-0.1.0.0
Dependency safe-coloured-text-layout -any: using
safe-coloured-text-layout-0.0.0.0
Dependency safe-coloured-text-terminfo -any: using
safe-coloured-text-terminfo-0.0.0.0
Dependency text -any: using text-1.2.4.1
Dependency time -any: using time-1.9.3
Dependency typed-process -any: using typed-process-0.2.7.0
Dependency unliftio -any: using unliftio-0.2.20
Dependency yaml -any: using yaml-0.11.7.0
Dependency base >=4.7 && <5: using base-4.14.3.0
Dependency feedback -any: using feedback-0.0.0.0
Dependency base >=4.7 && <5: using base-4.14.3.0
Dependency feedback -any: using feedback-0.0.0.0
Source component graph:
    component lib
    component exe:feedback dependency lib
    component exe:feedback-test dependency lib
Configured component graph:
    component feedback-0.0.0.0-FrmW95sBVbYIAT49Sc8O2f
        include autodocodec-0.0.1.0-2aE9TOHslyxDOxBrOFlJ3W
        include autodocodec-yaml-0.1.0.1-EM3EXrfmyyK41eGWqu9UGp
        include base-4.14.3.0
        include conduit-1.3.4.2-Bav9DO2UMcR1lglRKzjE8a
        include containers-0.6.5.1
        include envparse-0.4.1-slyQGDZrNnBIqAHBmO5Vh
        include fsnotify-0.3.0.1-9eay7fzcTnR1Vj55gJH8Ag
        include optparse-applicative-0.16.1.0-9yAhNP7kPjCKR0vfR9SZ3Y
        include path-0.8.0-Kqo1jkzgUdy9inlVQfLkhk
        include path-io-1.6.3-Bi5P8qrAslOAh98TWL31zn
        include pretty-show-1.10-LZeo5mRYHWT4tzUcUDlJ7N
        include safe-coloured-text-0.1.0.0-2Vm4Rw99pZfIRQb11OCwXh
        include safe-coloured-text-layout-0.0.0.0-AfZ4Qv75witDttjzWR8cy7
        include safe-coloured-text-terminfo-0.0.0.0-1zDOAU4cg1YDYv6vc1YW2s
        include text-1.2.4.1
        include time-1.9.3
        include typed-process-0.2.7.0-3jzDBfqEuQb36Vb22rf9FP
        include unliftio-0.2.20-2Mt6Rojd51D3vEJNEIfQNN
        include yaml-0.11.7.0-6ZSxY16on7v9udmqPetJX5
    component feedback-0.0.0.0-KiFkEmfZWtz6ZGSS5iQNHM-feedback
        include base-4.14.3.0
        include feedback-0.0.0.0-FrmW95sBVbYIAT49Sc8O2f
    component feedback-0.0.0.0-7sPAqoOUoAwRyPXk96sY3-feedback-test
        include base-4.14.3.0
        include feedback-0.0.0.0-FrmW95sBVbYIAT49Sc8O2f
Linked component graph:
    unit feedback-0.0.0.0-FrmW95sBVbYIAT49Sc8O2f
        include autodocodec-0.0.1.0-2aE9TOHslyxDOxBrOFlJ3W
        include autodocodec-yaml-0.1.0.1-EM3EXrfmyyK41eGWqu9UGp
        include base-4.14.3.0
        include conduit-1.3.4.2-Bav9DO2UMcR1lglRKzjE8a
        include containers-0.6.5.1
        include envparse-0.4.1-slyQGDZrNnBIqAHBmO5Vh
        include fsnotify-0.3.0.1-9eay7fzcTnR1Vj55gJH8Ag
        include optparse-applicative-0.16.1.0-9yAhNP7kPjCKR0vfR9SZ3Y
        include path-0.8.0-Kqo1jkzgUdy9inlVQfLkhk
        include path-io-1.6.3-Bi5P8qrAslOAh98TWL31zn
        include pretty-show-1.10-LZeo5mRYHWT4tzUcUDlJ7N
        include safe-coloured-text-0.1.0.0-2Vm4Rw99pZfIRQb11OCwXh
        include safe-coloured-text-layout-0.0.0.0-AfZ4Qv75witDttjzWR8cy7
        include safe-coloured-text-terminfo-0.0.0.0-1zDOAU4cg1YDYv6vc1YW2s
        include text-1.2.4.1
        include time-1.9.3
        include typed-process-0.2.7.0-3jzDBfqEuQb36Vb22rf9FP
        include unliftio-0.2.20-2Mt6Rojd51D3vEJNEIfQNN
        include yaml-0.11.7.0-6ZSxY16on7v9udmqPetJX5
        Feedback.Common.OptParse=feedback-0.0.0.0-FrmW95sBVbYIAT49Sc8O2f:Feedback.Common.OptParse,Feedback.Common.Output=feedback-0.0.0.0-FrmW95sBVbYIAT49Sc8O2f:Feedback.Common.Output,Feedback.Common.Process=feedback-0.0.0.0-FrmW95sBVbYIAT49Sc8O2f:Feedback.Common.Process,Feedback.Loop=feedback-0.0.0.0-FrmW95sBVbYIAT49Sc8O2f:Feedback.Loop,Feedback.Loop.Filter=feedback-0.0.0.0-FrmW95sBVbYIAT49Sc8O2f:Feedback.Loop.Filter,Feedback.Loop.OptParse=feedback-0.0.0.0-FrmW95sBVbYIAT49Sc8O2f:Feedback.Loop.OptParse,Feedback.Test=feedback-0.0.0.0-FrmW95sBVbYIAT49Sc8O2f:Feedback.Test,Feedback.Test.OptParse=feedback-0.0.0.0-FrmW95sBVbYIAT49Sc8O2f:Feedback.Test.OptParse
    unit feedback-0.0.0.0-KiFkEmfZWtz6ZGSS5iQNHM-feedback
        include base-4.14.3.0
        include feedback-0.0.0.0-FrmW95sBVbYIAT49Sc8O2f
    unit feedback-0.0.0.0-7sPAqoOUoAwRyPXk96sY3-feedback-test
        include base-4.14.3.0
        include feedback-0.0.0.0-FrmW95sBVbYIAT49Sc8O2f
Ready component graph:
    definite feedback-0.0.0.0-FrmW95sBVbYIAT49Sc8O2f
        depends autodocodec-0.0.1.0-2aE9TOHslyxDOxBrOFlJ3W
        depends autodocodec-yaml-0.1.0.1-EM3EXrfmyyK41eGWqu9UGp
        depends base-4.14.3.0
        depends conduit-1.3.4.2-Bav9DO2UMcR1lglRKzjE8a
        depends containers-0.6.5.1
        depends envparse-0.4.1-slyQGDZrNnBIqAHBmO5Vh
        depends fsnotify-0.3.0.1-9eay7fzcTnR1Vj55gJH8Ag
        depends optparse-applicative-0.16.1.0-9yAhNP7kPjCKR0vfR9SZ3Y
        depends path-0.8.0-Kqo1jkzgUdy9inlVQfLkhk
        depends path-io-1.6.3-Bi5P8qrAslOAh98TWL31zn
        depends pretty-show-1.10-LZeo5mRYHWT4tzUcUDlJ7N
        depends safe-coloured-text-0.1.0.0-2Vm4Rw99pZfIRQb11OCwXh
        depends safe-coloured-text-layout-0.0.0.0-AfZ4Qv75witDttjzWR8cy7
        depends safe-coloured-text-terminfo-0.0.0.0-1zDOAU4cg1YDYv6vc1YW2s
        depends text-1.2.4.1
        depends time-1.9.3
        depends typed-process-0.2.7.0-3jzDBfqEuQb36Vb22rf9FP
        depends unliftio-0.2.20-2Mt6Rojd51D3vEJNEIfQNN
        depends yaml-0.11.7.0-6ZSxY16on7v9udmqPetJX5
    definite feedback-0.0.0.0-KiFkEmfZWtz6ZGSS5iQNHM-feedback
        depends base-4.14.3.0
        depends feedback-0.0.0.0-FrmW95sBVbYIAT49Sc8O2f
    definite feedback-0.0.0.0-7sPAqoOUoAwRyPXk96sY3-feedback-test
        depends base-4.14.3.0
        depends feedback-0.0.0.0-FrmW95sBVbYIAT49Sc8O2f
Using Cabal-3.2.1.0 compiled by ghc-8.10
Using compiler: ghc-8.10.7
Using install prefix:
/nix/store/y9vq1gsb6y73dbhyiyrvmallg7zvcnfi-feedback-0.0.0.0
Executables installed in:
/nix/store/y9vq1gsb6y73dbhyiyrvmallg7zvcnfi-feedback-0.0.0.0/bin
Libraries installed in:
/nix/store/y9vq1gsb6y73dbhyiyrvmallg7zvcnfi-feedback-0.0.0.0/lib/ghc-8.10.7/aarch64-osx-ghc-8.10.7/feedback-0.0.0.0-FrmW95sBVbYIAT49Sc8O2f
Dynamic Libraries installed in:
/nix/store/y9vq1gsb6y73dbhyiyrvmallg7zvcnfi-feedback-0.0.0.0/lib/ghc-8.10.7/aarch64-osx-ghc-8.10.7
Private executables installed in:
/nix/store/y9vq1gsb6y73dbhyiyrvmallg7zvcnfi-feedback-0.0.0.0/libexec/aarch64-osx-ghc-8.10.7/feedback-0.0.0.0
Data files installed in:
/nix/store/y9vq1gsb6y73dbhyiyrvmallg7zvcnfi-feedback-0.0.0.0/share/aarch64-osx-ghc-8.10.7/feedback-0.0.0.0
Documentation installed in:
/nix/store/y9vq1gsb6y73dbhyiyrvmallg7zvcnfi-feedback-0.0.0.0/share/doc/aarch64-osx-ghc-8.10.7/feedback-0.0.0.0
Configuration files installed in:
/nix/store/y9vq1gsb6y73dbhyiyrvmallg7zvcnfi-feedback-0.0.0.0/etc
No alex found
Using ar found on system at:
/nix/store/nmdf1j8l8vqgsqmpm9r4y6fhxamsvfp7-cctools-binutils-darwin-949.0.1/bin/ar
No c2hs found
No cpphs found
No doctest found
Using gcc version 11.1.0 given by user at:
/nix/store/vgl74xhy14nvhabh1bk3zvngyir1mbxf-clang-wrapper-11.1.0/bin/clang
Using ghc version 8.10.7 found on system at:
/nix/store/2v8rkh9smb4ivx44wy4d6wjlrvzy2c01-ghc-8.10.7/bin/ghc
Using ghc-pkg version 8.10.7 found on system at:
/nix/store/2v8rkh9smb4ivx44wy4d6wjlrvzy2c01-ghc-8.10.7/bin/ghc-pkg
No ghcjs found
No ghcjs-pkg found
No greencard found
Using haddock version 2.24.2 found on system at:
/nix/store/2v8rkh9smb4ivx44wy4d6wjlrvzy2c01-ghc-8.10.7/bin/haddock
No happy found
Using haskell-suite found on system at: haskell-suite-dummy-location
Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location
No hmake found
Using hpc version 0.68 found on system at:
/nix/store/2v8rkh9smb4ivx44wy4d6wjlrvzy2c01-ghc-8.10.7/bin/hpc
Using hsc2hs version 0.68.7 found on system at:
/nix/store/2v8rkh9smb4ivx44wy4d6wjlrvzy2c01-ghc-8.10.7/bin/hsc2hs
No hscolour found
No jhc found
Using ld found on system at:
/nix/store/7chzynk0v8idgvxyxfmmmnhdwig6cx5b-cctools-binutils-darwin-wrapper-949.0.1/bin/ld
No pkg-config found
Using runghc version 8.10.7 found on system at:
/nix/store/2v8rkh9smb4ivx44wy4d6wjlrvzy2c01-ghc-8.10.7/bin/runghc
Using strip found on system at:
/nix/store/vgl74xhy14nvhabh1bk3zvngyir1mbxf-clang-wrapper-11.1.0/bin/strip
Using tar found on system at:
/nix/store/h5nm21liklpl95cr5wy42ph6gkybl3fb-gnutar-1.34/bin/tar
No uhc found
@nix { "action": "setPhase", "phase": "buildPhase" }
building
Preprocessing library for feedback-0.0.0.0..
Building library for feedback-0.0.0.0..
[1 of 9] Compiling Paths_feedback   ( dist/build/autogen/Paths_feedback.hs, dist/build/Paths_feedback.o, dist/build/Paths_feedback.dyn_o )
[2 of 9] Compiling Feedback.Common.OptParse ( src/Feedback/Common/OptParse.hs, dist/build/Feedback/Common/OptParse.o, dist/build/Feedback/Common/OptParse.dyn_o )
[3 of 9] Compiling Feedback.Test.OptParse ( src/Feedback/Test/OptParse.hs, dist/build/Feedback/Test/OptParse.o, dist/build/Feedback/Test/OptParse.dyn_o )
[4 of 9] Compiling Feedback.Loop.Filter ( src/Feedback/Loop/Filter.hs, dist/build/Feedback/Loop/Filter.o, dist/build/Feedback/Loop/Filter.dyn_o )
[5 of 9] Compiling Feedback.Common.Process ( src/Feedback/Common/Process.hs, dist/build/Feedback/Common/Process.o, dist/build/Feedback/Common/Process.dyn_o )
[6 of 9] Compiling Feedback.Common.Output ( src/Feedback/Common/Output.hs, dist/build/Feedback/Common/Output.o, dist/build/Feedback/Common/Output.dyn_o )
[7 of 9] Compiling Feedback.Test    ( src/Feedback/Test.hs, dist/build/Feedback/Test.o, dist/build/Feedback/Test.dyn_o )
[8 of 9] Compiling Feedback.Loop.OptParse ( src/Feedback/Loop/OptParse.hs, dist/build/Feedback/Loop/OptParse.o, dist/build/Feedback/Loop/OptParse.dyn_o )
[9 of 9] Compiling Feedback.Loop    ( src/Feedback/Loop.hs, dist/build/Feedback/Loop.o, dist/build/Feedback/Loop.dyn_o )
Preprocessing executable 'feedback' for feedback-0.0.0.0..
Building executable 'feedback' for feedback-0.0.0.0..

�[;1m<built-in>:15:10: �[;1m�[31merror:�[0m�[0m�[;1m�[0m�[0m�[;1m
     error: non-portable path to file '"dist/build/Feedback/autogen/cabal_macros.h"'; specified path differs in case from file name on disk [-Werror,-Wnonportable-include-path]�[0m�[0m
�[0m�[0m�[0m#include "dist/build/feedback/autogen/cabal_macros.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         "dist/build/Feedback/autogen/cabal_macros.h"
1 error generated.

�[;1mdist/build/feedback/autogen/Paths_feedback.hs:1:1: �[;1m�[31merror:�[0m�[0m�[;1m�[0m�[0m�[;1m
    `cc' failed in phase `C pre-processor'. (Exit code: 1)�[0m�[0m
�[;1m�[34m  |�[0m�[0m
�[;1m�[34m1 |�[0m�[0m �[;1m�[31m{�[0m�[0m-# LANGUAGE CPP #-}
�[;1m�[34m  |�[0m�[0m�[;1m�[31m ^�[0m�[0m
�[0m�[0m�[0m

Do you think this is something that could be easily fixed?

feature request: corrections

some feedback loops have straightforward correcting commands that could be defined in the data for the loop itself. The idea here is you get a menu like

       > Found errors with nixpkgs-fmt, try running /nix/store/n2h8p3xgn2fp1k6a8lkr59qfskzva46z-lint/bin/lint
       For full logs, run 'nix log /nix/store/610csvkw8h9wwr7l2bz080g779lv70gh-nixpkgs-fmt.drv'.
12:51:52 exited:    failed: 1
12:51:52 took       5.59s

Press to correct:

[0]: nixpkgs-fmt
[1]: stylish-haskell

If you press the appropriate key in the terminal running feedback then the command is executed for you and the feedback loop rerun

defined something like

loops:
  check:
    command: nix flake check -L
    corrections:
      nixpkgs-fmt:
        key: 0
        command: find . -name '*.nix' | xargs nixpkgs-fmt

command to return just the keys

If you have multiple loops for the same project in different windows there's some friction when resuming a project, especially if that project is checked out on a remote machine.

One way to help might be to have feedback keys that returns the keys, then the user can run something like:

feedback keys | xargs -I{} alacritty --command "feedback {}"

The remote situation would then be a lot of typing but possible with ssh commands I think?

gitLsFiles deadlocks on largish repos

gitLsFiles :: Path Abs Dir -> IO (Maybe (Set FilePath))
gitLsFiles here = do
let processConfig = setStdout createPipe $ shell "git ls-files"
process <- startProcess processConfig
ec <- waitExitCode process
case ec of
ExitFailure _ -> pure Nothing
ExitSuccess -> Just <$> handleFileSet here (getStdout process)

This code is problematic: it creates a pipe for stdout, but does not read from it until the process exits. This works at small scale, as long as the full output fits into pipe's buffer (typically up to 64K), but otherwise deadlocks: the process cannot exit, because it has not finished with its output, but the pipe is full and no one reads from it.

I originally (#5 (comment)) thought that this is a Windows-specific issue, but it is not. One can reproduce it by running feedback inside a git repo, where git ls-files takes more than 64K. E. g., GHC repo is big enough.

filesFromFindArgs has the same defect.


FWIW I'm not quite convinced that the usage of conduit is fully justified: one cannot lazily return Set FilePath, so nothing is actually streamed and all data is loaded into memory anyway. A straightforward readProcess should work to the same effect.

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.