Closed cartazio closed 6 years ago
One issue i hit is that FunCo and FunTy are define both by you AND by ghc, i assumed in this context you wanted to use your data type, but maybe it should move over to using the in ghc one in 8.2 onwards?
Hey, great! I'm giving it a spin now.
I see that there are three resolvers listed in stack.yaml. I didn't know one can provide several resolvers. Is the idea that they all build with "stack build
" etc?
i'm actually not familiar with stack ... so i have no clue what i'm doing for that, my latest push is me trying to move to the haskell-ci style travis by @hvr et al. I dont know how to fix stack issues :)
https://travis-ci.org/conal/concat/builds/389856296?utm_source=github_status&utm_medium=notification should be a better build matrix :)
With resolver: lts-9.20
I get the following errors:
Preprocessing library concat-classes-0.3.0.0...
[1 of 6] Compiling ConCat.Misc ( src/ConCat/Misc.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/ConCat/Misc.o )
[2 of 6] Compiling ConCat.Orphans ( src/ConCat/Orphans.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/ConCat/Orphans.o )
/Users/conal/tmp/concat/classes/src/ConCat/Orphans.hs:376:24: error:
Not in scope: type constructor or class ‘Distributive’
/Users/conal/tmp/concat/classes/src/ConCat/Orphans.hs:381:24: error:
Not in scope: type constructor or class ‘Representable’
woops: if you look at that code, i did a fix, but i clearly did the conditional imports wrong
pushed a fix for that
Now:
bash-3.2$ stack build
Configuring concat-plugin-0.3.0.0...
Preprocessing library concat-plugin-0.3.0.0...
[1 of 4] Compiling ConCat.Translators ( src/ConCat/Translators.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/ConCat/Translators.o )
[2 of 4] Compiling ConCat.Rebox ( src/ConCat/Rebox.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/ConCat/Rebox.o )
[3 of 4] Compiling ConCat.Plugin ( src/ConCat/Plugin.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/ConCat/Plugin.o )
/Users/conal/tmp/concat/plugin/src/ConCat/Plugin.hs:1049:25: error:
Not in scope: ‘OrdMap.lookupUDFM’
Perhaps you meant one of these:
‘OrdMap.lookup’ (imported from Data.Map),
‘OrdMap.lookupGE’ (imported from Data.Map),
‘OrdMap.lookupGT’ (imported from Data.Map)
Module ‘Data.Map’ does not export ‘lookupUDFM’.
/Users/conal/tmp/concat/plugin/src/ConCat/Plugin.hs:1840:16: error:
Not in scope: ‘DFMap.listToUDFM’
No module named ‘DFMap’ is imported.
Are you seeing this error as well?
shoot, thats why i'm trying to fix up the CI, i'm building on 8.2 atm, but i know what mistake that is in my patch, i'll fix it now :)
[3 of 4] Compiling ConCat.Plugin ( src/ConCat/Plugin.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/ConCat/Plugin.o )
/Users/conal/tmp/concat/plugin/src/ConCat/Plugin.hs:1840:16: error:
Not in scope: ‘DFMap.listToUDFM’
No module named ‘DFMap’ is imported.
@kosmikus Note what @cartazio is up to. I won't merge until the gold tests work for at least 8.0.2.
i see a missed CPP wrapping, i'll push the fix shortly
hrmm, based on https://travis-ci.org/conal/concat/builds/389859988 it looks like language-glsl doesn't have a ghc 8.4.3 release yet
@conal can you kill builds 81 and 82? (so the tip can be tested sooner? :) )
i think my current version of the travis CI script probably also tests the netlist family of packages, but that should be doable to fix
i'm gonna disable checking haddocks for now, cabal 2.2 has a bug in doc gen or two
i have a PR to cabal that fixes it, but https://github.com/haskell/cabal/pull/5269 need feedback or an owner to make it land, though it probably needs some feedback
cabal: Tests failed for test:gold-tests from concat-examples-0.3.0.0. Tests failed for test:misc-examples from concat-examples-0.3.0.0. Tests failed for test:misc-trace from concat-examples-0.3.0.0. Tests failed for test:hardware-trace from concat-hardware-0.1.0.0.
on 8.2 on my mac :(
ok, the travis tests failed on 8.0.2 because of the OOm killer Configuring test suite 'misc-examples' for concat-examples-0.3.0.0.. Preprocessing test suite 'misc-examples' for concat-examples-0.3.0.0.. Building test suite 'misc-examples' for concat-examples-0.3.0.0.. Configuring test suite 'gold-tests' for concat-examples-0.3.0.0.. Preprocessing test suite 'gold-tests' for concat-examples-0.3.0.0.. Building test suite 'gold-tests' for concat-examples-0.3.0.0.. cabal: Failed to build test:gold-tests from concat-examples-0.3.0.0. The build process was killed (i.e. SIGKILL). The typical reason for this is that there is not enough memory available (e.g. the OS killed a process using lots of memory).
Preprocessing library for concat-hardware-0.1.0.0.. Building library for concat-hardware-0.1.0.0.. Configuring library for concat-graphics-0.1.0.0.. Preprocessing library for concat-graphics-0.1.0.0.. Building library for concat-graphics-0.1.0.0.. Configuring test suite 'misc-trace' for concat-examples-0.3.0.0.. Preprocessing test suite 'misc-trace' for concat-examples-0.3.0.0.. Building test suite 'misc-trace' for concat-examples-0.3.0.0.. Running 1 test suites... Test suite misc-trace: RUNNING...
misc-trace: Oops: toCcc' called Test suite misc-trace: FAIL Test suite logged to: /home/travis/build/conal/concat/dist-newstyle/build/x86_64-linux/ghc-8.0.2/concat-examples-0.3.0.0/t/misc-trace/test/concat-examples-0.3.0.0-misc-trace.log 0 of 1 test suites (0 of 1 test cases) passed. cabal: Tests failed for test:misc-trace from concat-examples-0.3.0.0.
i fixed the OOM, but still get a bug
maybe that build failure was because i set -O0 on the test suite, trying again
@conal is there a way to suppress all the rule firing trace data?
figured it out i'm gonna add a -fDebugConcat flag to concat-plugin so that the Doing Macro is easy to toggle as a build flag
... -fDebugConcat flag ...
Have you noticed the existing debugging flags?
theres none in any of the concat-*.cabal files, so nope i haven't seen any.
You do use lots of CPP, but you dont expose toggling it at the cabal level
@conal is there a way to suppress all the rule firing trace data?
Yes: don't turn on tracing, i.e., don't use -fplugin-opt=ConCat.Plugin:xyz
, where xyz
is "trace
", "showResiduals
", or "showCcc
".
maybe that build failure was because i set -O0 on the test suite, trying again
Turning off optimizations will make rewrite rules not fire, breaking the plugin.
the DOING macro isn't controlled by those flags ...
theres none in any of the concat-*.cabal files, so nope i haven't seen any.
Right. It's instead in the source files, e.g., concat/examples/test/Examples.hs .
There's also the "misc-trace" target in concat-examples.cabal.
If you don't want tracing, you can use "misc-examples" instead.
why would i be seeing the error "./gold-tests/build/gold-tests/gold-tests gold-tests: Oops: toCcc' called"
the DOING macro isn't controlled by those flags ...
That macro uses dtrace
, which is influenced by the flags.
ok. My point still stands that having these be cabal visible flags :)
but lets table that for now
@conal for local tests you may wanan revert my stack.yml edit
Under GHC 8.0.2 (resolver: lts-9.20
in stack.yaml):
stack build
...
[3 of 4] Compiling ConCat.Plugin ( src/ConCat/Plugin.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/ConCat/Plugin.o )
/Users/conal/tmp/concat/plugin/src/ConCat/Plugin.hs:58:1: warning: [-Wdodgy-imports]
Module ‘TyCoRep’ does not export ‘FunTy’
/Users/conal/tmp/concat/plugin/src/ConCat/Plugin.hs:58:1: warning: [-Wdodgy-imports]
Module ‘TyCoRep’ does not export ‘FunCo’
yup, on newer ghc it exports that, so i chose correctly it sounds like
Ah, I see. Just a warning, to be fixed via another CPP conditional I guess.
Building library for concat-graphics-0.1.0.0.. Running 1 test suites... Test suite misc-examples: RUNNING...
misc-examples: Oops: toCcc' called Test suite misc-examples: FAIL Test suite logged to: /Users/carter/WorkSpace/projects/active/concat-linear-work/dist-newstyle/build/x86_64-osx/ghc-8.2.2/concat-examples-0.3.0.0/t/misc-examples/test/concat-examples-0.3.0.0-misc-examples.log 0 of 1 test suites (0 of 1 test cases) passed. Running 1 test suites... Test suite misc-trace: RUNNING...
misc-trace: Oops: toCcc' called Test suite misc-trace: FAIL Test suite logged to: /Users/carter/WorkSpace/projects/active/concat-linear-work/dist-newstyle/build/x86_64-osx/ghc-8.2.2/concat-examples-0.3.0.0/t/misc-trace/test/concat-examples-0.3.0.0-misc-trace.log 0 of 1 test suites (0 of 1 test cases) passed. Configuring test suite 'gold-tests' for concat-examples-0.3.0.0.. Preprocessing test suite 'gold-tests' for concat-examples-0.3.0.0.. Building test suite 'gold-tests' for concat-examples-0.3.0.0.. Running 1 test suites... Test suite gold-tests: RUNNING... gold-tests: Oops: toCcc' called Test suite gold-tests: FAIL Test suite logged to: /Users/carter/WorkSpace/projects/active/concat-linear-work/dist-newstyle/build/x86_64-osx/ghc-8.2.2/concat-examples-0.3.0.0/t/gold-tests/test/concat-examples-0.3.0.0-gold-tests.log 0 of 1 test suites (0 of 1 test cases) passed. cabal: Tests failed for test:gold-tests from concat-examples-0.3.0.0. Tests failed for test:misc-examples from concat-examples-0.3.0.0. Tests failed for test:misc-trace from concat-examples-0.3.0.0.
somehow the way / order of toCCC being invoked isn't working?
Which compiler version?
ghc 8.2.2
Got it. Thanks. I just confirmed that the gold tests are working fine with your tweaked concat under 8.0.2. That's great! Now I can accept the PR and start investigating the 8.2 issues.
Do you want to make any more tweaks to your PR before I merge?
nah this is great :)
you may wanna move the tracing flags into concat-plugin btw :)
.cabal
(or .... at least document them in the top level)
Hm. I don't think I know what you mean. The tracing flags are plugin flags, given for plugin clients rather than for the plugin itself.
gotcha.
where are they currently documented :)
Nowhere, I'm afraid.
could you tell me ? or add it to the readme.md at the top?
i'm taking the next day or so to see if i can embed a linear logic checker / proof generator in haskell via your concat plugin, this is the first of several change sets i'll be posting your way
one class of warning i'm ignoring for now is the following (below), but aside from that family of (slightly scary?) errors, everythign else works