digitalmars.D.learn - Can't get dub dustmite to work
- aliak (51/51) Apr 25 2020 Trying to get dub dustmite to work, but I keep getting "initial
- Andre Pany (13/61) Apr 25 2020 How do you call dub test causing the issue? Maybe there is a
- aliak (8/20) Apr 26 2020 I'm sorry I didn't follow.
- Andre Pany (7/24) Apr 26 2020 Yes, that was my question. `dub test` will use configuration
- Aliak (2/28) Apr 27 2020 Ah ok. Yes I was passing the unittest confit to dub dustmite.
- Andre Pany (5/35) Apr 27 2020 In the logs above I can see you pass only the build type but not
- Anonymouse (5/8) Apr 25 2020 I have had zero luck with dustmite via dub. I would honestly
- aliak (28/37) Apr 26 2020 Ok I got it working with that but it resulted in the wrong output
- Anonymouse (7/45) Apr 27 2020 I'm not at the computer but I expect what's happening is backtick
Trying to get dub dustmite to work, but I keep getting "initial test fails" This is the error from a vanilla dub test: ``` result ~wip: building configuration "result-test-unittest"... inout(SumType!(int, FailureContainer)) ../../.dub/packages/sumtype-0.9.4/sumtype/src/sumtype.d(1322,4): function(FailureContainer container) pure nothrow nogc safe never matches" ../../.dub/packages/sumtype-0.9.4/sumtype/src/sumtype.d(1165,14): instantiated from here: matchImpl!(inout(SumType!(int, FailureContainer))) source/result/result.d(136,20): instantiated from here: match!(inout(SumType!(int, FailureContainer))) tests/result.d(20,20): instantiated from here: Result!(int, Exception) dmd failed with exit code 1. ``` Then I run this dub dustmite command: dub dustmite -b unittest ../dubdust --compiler-regex="never matches" And I get: ``` ... Loading /Users/aliak/dev/dubdust/vibe-d/web/vibe/web/web.d None => No Hint: use --no-redirect to see test script output Hint: read https://github.com/CyberShadow/DustMite/wiki#initial-test-fails object.Exception DustMite/dustmite.d(295): Initial test fails: Test script "/usr/local/Cellar/dub/1.20.0/bin/dub dustmite --vquiet --test-package=result --build=unittest --config=library \"--compiler=dmd\" \"--compiler-regex=never matches\"" exited with exit code 3 (failure) ``` * --no-redirect doesn't work in dub dustmite. * I tried adding --compiler-status=1 with the same result * I tired --combined with the same result My dub.json for the unittest configuration is (incase that matters): { "name": "unittest", "importPaths": [ "./tests" ], "sourcePaths": [ "./tests" ] }, Thanks for any help!
Apr 25 2020
On Saturday, 25 April 2020 at 09:38:59 UTC, aliak wrote:Trying to get dub dustmite to work, but I keep getting "initial test fails" This is the error from a vanilla dub test: ``` result ~wip: building configuration "result-test-unittest"... inout(SumType!(int, FailureContainer)) ../../.dub/packages/sumtype-0.9.4/sumtype/src/sumtype.d(1322,4): Error: static container) pure nothrow nogc safe never matches" ../../.dub/packages/sumtype-0.9.4/sumtype/src/sumtype.d(1165,14): instantiated from here: matchImpl!(inout(SumType!(int, FailureContainer))) source/result/result.d(136,20): instantiated from here: match!(inout(SumType!(int, FailureContainer))) tests/result.d(20,20): instantiated from here: Result!(int, Exception) dmd failed with exit code 1. ``` Then I run this dub dustmite command: dub dustmite -b unittest ../dubdust --compiler-regex="never matches" And I get: ``` ... Loading /Users/aliak/dev/dubdust/vibe-d/web/vibe/web/web.d None => No Hint: use --no-redirect to see test script output Hint: read https://github.com/CyberShadow/DustMite/wiki#initial-test-fails object.Exception DustMite/dustmite.d(295): Initial test fails: Test script "/usr/local/Cellar/dub/1.20.0/bin/dub dustmite --vquiet --test-package=result --build=unittest --config=library \"--compiler=dmd\" \"--compiler-regex=never matches\"" exited with exit code 3 (failure) ``` * --no-redirect doesn't work in dub dustmite. * I tried adding --compiler-status=1 with the same result * I tired --combined with the same result My dub.json for the unittest configuration is (incase that matters): { "name": "unittest", "importPaths": [ "./tests" ], "sourcePaths": [ "./tests" ] }, Thanks for any help!How do you call dub test causing the issue? Maybe there is a difference in the configuration/build type. Also a side remark. You cannot use the output of dmd when colouring is on. Dmd lies because the backticks used for colouring are not shown. But without them, regex search is failing. I also wonder whether dub Dustmite should be enhanced to search for a plain text too. Because while using regex search there might be characters which have a regex meaning while user just want a simple text search. This could also cause issues. Kind regards Andre
Apr 25 2020
On Saturday, 25 April 2020 at 18:52:45 UTC, Andre Pany wrote:How do you call dub test causing the issue? Maybe there is a difference in the configuration/build type.I'm sorry I didn't follow. You mean like: "dub test" ?? I dont pass anything to the -b or -c flag if that's what you mean?Also a side remark. You cannot use the output of dmd when colouring is on. Dmd lies because the backticks used for colouring are not shown. But without them, regex search is failing.Yeah, that's a good tip. This output is because of a static assert in the sumtype library.I also wonder whether dub Dustmite should be enhanced to search for a plain text too. Because while using regex search there might be characters which have a regex meaning while user just want a simple text search. This could also cause issues. Kind regards Andre
Apr 26 2020
On Sunday, 26 April 2020 at 22:07:56 UTC, aliak wrote:On Saturday, 25 April 2020 at 18:52:45 UTC, Andre Pany wrote:Yes, that was my question. `dub test` will use configuration `unittest`, therefore you have to pass the configuration `unittest` to `dub dustmite` too. Kind regards AndréHow do you call dub test causing the issue? Maybe there is a difference in the configuration/build type.I'm sorry I didn't follow. You mean like: "dub test" ?? I dont pass anything to the -b or -c flag if that's what you mean?Also a side remark. You cannot use the output of dmd when colouring is on. Dmd lies because the backticks used for colouring are not shown. But without them, regex search is failing.Yeah, that's a good tip. This output is because of a static assert in the sumtype library.
Apr 26 2020
On Monday, 27 April 2020 at 06:23:08 UTC, Andre Pany wrote:On Sunday, 26 April 2020 at 22:07:56 UTC, aliak wrote:Ah ok. Yes I was passing the unittest confit to dub dustmite.On Saturday, 25 April 2020 at 18:52:45 UTC, Andre Pany wrote:Yes, that was my question. `dub test` will use configuration `unittest`, therefore you have to pass the configuration `unittest` to `dub dustmite` too. Kind regards André[...]I'm sorry I didn't follow. You mean like: "dub test" ?? I dont pass anything to the -b or -c flag if that's what you mean?[...]Yeah, that's a good tip. This output is because of a static assert in the sumtype library.
Apr 27 2020
On Monday, 27 April 2020 at 07:06:03 UTC, Aliak wrote:On Monday, 27 April 2020 at 06:23:08 UTC, Andre Pany wrote:In the logs above I can see you pass only the build type but not the configuration (just to make you aware, there is a difference). Kind regards AndreOn Sunday, 26 April 2020 at 22:07:56 UTC, aliak wrote:Ah ok. Yes I was passing the unittest confit to dub dustmite.On Saturday, 25 April 2020 at 18:52:45 UTC, Andre Pany wrote:Yes, that was my question. `dub test` will use configuration `unittest`, therefore you have to pass the configuration `unittest` to `dub dustmite` too. Kind regards André[...]I'm sorry I didn't follow. You mean like: "dub test" ?? I dont pass anything to the -b or -c flag if that's what you mean?[...]Yeah, that's a good tip. This output is because of a static assert in the sumtype library.
Apr 27 2020
On Saturday, 25 April 2020 at 09:38:59 UTC, aliak wrote:Then I run this dub dustmite command: dub dustmite -b unittest ../dubdust --compiler-regex="never matches"I have had zero luck with dustmite via dub. I would honestly recommend that you create a shell script that does `dub test 2>&1 | grep "never matches"`, and just use that as a tester with dustmite directly.
Apr 25 2020
On Saturday, 25 April 2020 at 19:00:55 UTC, Anonymouse wrote:On Saturday, 25 April 2020 at 09:38:59 UTC, aliak wrote:Ok I got it working with that but it resulted in the wrong output (it was a bad test case basically" But expanding the shell script to `Optional!(Exception) function(FailureContainer container) pure nothrow nogc safe` never matches\"' now results in ... Loading ./source/result/failure.d Loading ./source/result/package.d Loading ./source/result/result.d Loading ./tests/result.d None => No Hint: use --no-redirect to see test script output Hint: read https://github.com/CyberShadow/DustMite/wiki#initial-test-fails object.Exception DustMite/dustmite.d(295): Initial test fails: Test script "dub test 2>&1 | grep 'Error: static assert: (failure) ---------------- ??:? _Dmain [0x10c56cf5e] This is the full dustmite command: dustmite --force . "dub test 2>&1 | grep 'Error: static assert: function(FailureContainer container) pure nothrow nogc safe` never matches\"'"Then I run this dub dustmite command: dub dustmite -b unittest ../dubdust --compiler-regex="never matches"I have had zero luck with dustmite via dub. I would honestly recommend that you create a shell script that does `dub test 2>&1 | grep "never matches"`, and just use that as a tester with dustmite directly.
Apr 26 2020
On Sunday, 26 April 2020 at 22:05:20 UTC, aliak wrote:On Saturday, 25 April 2020 at 19:00:55 UTC, Anonymouse wrote:I'm not at the computer but I expect what's happening is backtick command substitution. It's difficult to get right since you want to nest quotes here, but you may be able to get around it by just escaping the backticks too. The easy solution is a shell script. I'll test it some more once I have something better to type on than the phone.On Saturday, 25 April 2020 at 09:38:59 UTC, aliak wrote:Ok I got it working with that but it resulted in the wrong output (it was a bad test case basically" But expanding the shell script to type `Optional!(Exception) function(FailureContainer container) pure nothrow nogc safe` never matches\"' now results in ... Loading ./source/result/failure.d Loading ./source/result/package.d Loading ./source/result/result.d Loading ./tests/result.d None => No Hint: use --no-redirect to see test script output Hint: read https://github.com/CyberShadow/DustMite/wiki#initial-test-fails object.Exception DustMite/dustmite.d(295): Initial test fails: Test script "dub test 2>&1 | grep 'Error: static assert: (failure) ---------------- ??:? _Dmain [0x10c56cf5e] This is the full dustmite command: dustmite --force . "dub test 2>&1 | grep 'Error: static assert: function(FailureContainer container) pure nothrow nogc safe` never matches\"'"Then I run this dub dustmite command: dub dustmite -b unittest ../dubdust --compiler-regex="never matches"I have had zero luck with dustmite via dub. I would honestly recommend that you create a shell script that does `dub test 2>&1 | grep "never matches"`, and just use that as a tester with dustmite directly.
Apr 27 2020