Re: Can't get dub dustmite to work
On Sunday, 26 April 2020 at 22:05:20 UTC, aliak wrote: On Saturday, 25 April 2020 at 19:00:55 UTC, Anonymouse wrote: 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. 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 dub test 2>&1 | grep 'Error: static assert: \"handler #0 of 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: \"handler #0 of type never matches\"'" exited with exit code 1 (failure) ??:? _Dmain [0x10c56cf5e] This is the full dustmite command: dustmite --force . "dub test 2>&1 | grep 'Error: static assert: \"handler #0 of type `Optional!(Exception) function(FailureContainer container) pure nothrow @nogc @safe` never matches\"'" 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.
Re: Can't get dub dustmite to work
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: 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: [...] 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. 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é Ah ok. Yes I was passing the unittest confit to dub dustmite. 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 Andre
Re: Can't get dub dustmite to work
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: On Saturday, 25 April 2020 at 18:52:45 UTC, Andre Pany wrote: [...] 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. 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é Ah ok. Yes I was passing the unittest confit to dub dustmite.
Re: Can't get dub dustmite to work
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: 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. 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é
Re: Can't get dub dustmite to work
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
Re: Can't get dub dustmite to work
On Saturday, 25 April 2020 at 19:00:55 UTC, Anonymouse wrote: 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. 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 dub test 2>&1 | grep 'Error: static assert: \"handler #0 of 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: \"handler #0 of type never matches\"'" exited with exit code 1 (failure) ??:? _Dmain [0x10c56cf5e] This is the full dustmite command: dustmite --force . "dub test 2>&1 | grep 'Error: static assert: \"handler #0 of type `Optional!(Exception) function(FailureContainer container) pure nothrow @nogc @safe` never matches\"'"
Re: Can't get dub dustmite to work
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.
Re: Can't get dub dustmite to work
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 assert: "handler #1 of type Optional!(Exception) 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! 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
Can't get dub dustmite to work
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 assert: "handler #1 of type Optional!(Exception) 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!
Re: dub dustmite struggles
On Monday, 20 January 2020 at 15:04:32 UTC, Andre Pany wrote: In general dub Dustmite works fine, I used it several times. Maybe it has to do s.th. with your project structure. Please create a dub issue with an example zip. I've created a minimal nested project with a similar structure (library with nested app project), and dub-dustmite works fine there. So it must be something peculiar to my real project. Once the standalone dustmite finishes running, I'll spend some time manually reducing my project structure to something repeatable to file an issue with. Thanks!
Re: dub dustmite struggles
On Monday, 20 January 2020 at 06:48:08 UTC, DanielG wrote: I can't seem to figure out what dub's dustmite command is looking for with its regexes. No matter what I try - no matter how simple - the initial test fails. I am able to run dustmite standalone just fine with the following test script: cd example dub 2>&1 | grep -F "ScrollView6__initZ+0xd8): undefined reference to \`internal'" However, when I attempt using 'dub dustmite' with --linker-regex (or --linker-status, even), the initial test always fails. I've also tried simplifying the regex on the assumption that I'm not escaping things properly - to no avail. Is it perhaps something to do with my project structure? My project is a library containing an /example subfolder, containing an application dub project, and that's where my linker error occurs, not in the library itself. So that's where I'm attempting to run dub dustmite as well. In general dub Dustmite works fine, I used it several times. Maybe it has to do s.th. with your project structure. Please create a dub issue with an example zip. But yes, it could take also with dub a lot of time. One thing which caused me a lot of headaches, dmd is lies about the error message if coloured output is on. Then the error text lacks some characters. Kind regards Andre
Re: dub dustmite struggles
On Monday, 20 January 2020 at 07:14:24 UTC, FeepingCreature wrote: dustmite example ../test.sh Right, that's what I'm already doing now. However, the process is extremely slow (takes 10+ hours for the current project, when I've done this in the past) so I am hoping to speed things up a bit by using dub's dustmite directly (vs. the test script invoking dub anew on each run).
Re: dub dustmite struggles
On Monday, 20 January 2020 at 06:48:08 UTC, DanielG wrote: I can't seem to figure out what dub's dustmite command is looking for with its regexes. No matter what I try - no matter how simple - the initial test fails. I am able to run dustmite standalone just fine with the following test script: cd example dub 2>&1 | grep -F "ScrollView6__initZ+0xd8): undefined reference to \`internal'" However, when I attempt using 'dub dustmite' with --linker-regex (or --linker-status, even), the initial test always fails. I've also tried simplifying the regex on the assumption that I'm not escaping things properly - to no avail. Is it perhaps something to do with my project structure? My project is a library containing an /example subfolder, containing an application dub project, and that's where my linker error occurs, not in the library itself. So that's where I'm attempting to run dub dustmite as well. I don't know how `dub dustmite` works, but my advice would be to use standalone dustmite and write a shellscript that handles your success/fail condition with an exit code. That's always worked for me, and it makes it easier to externally check what's happening. Ie. test.sh: --- #!/bin/sh dub 2>&1 |grep -F "ScrollView6__initZ+0xd8): undefined reference to \`internal'" --- dustmite example ../test.sh Then if you have to recurse into a dub project, just copy it into your example folder so it's compiled in, and repeat.
dub dustmite struggles
I can't seem to figure out what dub's dustmite command is looking for with its regexes. No matter what I try - no matter how simple - the initial test fails. I am able to run dustmite standalone just fine with the following test script: cd example dub 2>&1 | grep -F "ScrollView6__initZ+0xd8): undefined reference to \`internal'" However, when I attempt using 'dub dustmite' with --linker-regex (or --linker-status, even), the initial test always fails. I've also tried simplifying the regex on the assumption that I'm not escaping things properly - to no avail. Is it perhaps something to do with my project structure? My project is a library containing an /example subfolder, containing an application dub project, and that's where my linker error occurs, not in the library itself. So that's where I'm attempting to run dub dustmite as well.
Re: dub dustmite: Initial test fails
On Tuesday, 23 February 2016 at 11:09:00 UTC, denizzzka wrote: Hi! I have a code with segfault. I decided to try to take advantage with dub dustmite: $ dub dustmite ~/ssd/pgator_dustmite0 --program-status=139 -- --config=my_pgator.conf --debug=true Shells process signal exit codes in a special way. Try `--program-status=-11`.
dub dustmite: Initial test fails
Hi! I have a code with segfault. I decided to try to take advantage with dub dustmite: $ dub dustmite ~/ssd/pgator_dustmite0 --program-status=139 -- --config=my_pgator.conf --debug=true WARNING: A deprecated branch based version specification is used for the dependency vibe-d-postgresql. Please use numbered versions instead. Also note that you can still use the dub.selections.json file to override a certain dependency to use a branch instead. Copy package 'pgator' to destination folder... Copy package 'vibe-d-postgresql' to destination folder... Copy package 'dpq2' to destination folder... Copy package 'derelict-pq' to destination folder... Copy package 'derelict-util' to destination folder... Copy package 'vibe-d' to destination folder... Copy package 'libasync' to destination folder... Copy package 'memutils' to destination folder... Copy package 'libev' to destination folder... Copy package 'libevent' to destination folder... Copy package 'openssl' to destination folder... Executing dustmite... None => No object.Exception@DustMite/dustmite.d(243): Initial test fails but if I try to run already compiled binary it is successfully core dumps: $ ./pgator --config=my_pgator.conf --debug=true; echo $? 2016-02-23T18:07:00.748:package.d:_sharedStaticCtor6:9 DerelictPQ loading... 2016-02-23T18:07:00.748:package.d:_sharedStaticCtor6:16 ...DerelictPQ loading finished 2016-02-23T18:07:00.750:package.d:connectionFactory:50 creating new connection 2016-02-23T18:07:00.750:package.d:connectionFactory:54 new connection is started 2016-02-23T18:07:00.750:package.d:runStatementBlockingManner:126 runStatementBlockingManner 2016-02-23T18:07:00.750:package.d:doQuery:66 get connection from a pool 2016-02-23T18:07:00.753:package.d:doQuery:90 doesQuery() call 2016-02-23T18:07:00.753:package.d:__lambda5:140 consumeInput() 2016-02-23T18:07:00.753:package.d:__lambda5:145 getResult() 2016-02-23T18:07:00.753:package.d:__lambda5:145 getResult() 2016-02-23T18:07:00.754:app.d:main:88 found method row: "echo" "SELECT $1::text as echoed" ["value_for_echo"] false 2016-02-23T18:07:00.754:app.d:main:137 Method echo loaded. Content: Method("echo", "SELECT $1::text as echoed", ["value_for_echo"], false) 2016-02-23T18:07:00.754:app.d:main:88 found method row: "echo2" "SELECT $1::text" ["value_for_echo"] NULL 2016-02-23T18:07:00.754:app.d:main:132 Value of column one_row_flag is NULL, skipping reading of method echo2 2016-02-23T18:07:00.754:app.d:main:88 found method row: "wrong_sql_statement" "wrong SQL statement" [] false 2016-02-23T18:07:00.754:app.d:main:137 Method wrong_sql_statement loaded. Content: Method("wrong_sql_statement", "wrong SQL statement", [], false) 2016-02-23T18:07:00.754:app.d:main:141 Number of methods in the table "pgator_rpc": 3, failed to load: 1 2016-02-23T18:07:00.754:app.d:__foreachbody18:148 try to prepare method wrong_sql_statement 2016-02-23T18:07:00.754:package.d:runStatementBlockingManner:126 runStatementBlockingManner 2016-02-23T18:07:00.754:package.d:doQuery:66 get connection from a pool 2016-02-23T18:07:00.754:package.d:doQuery:90 doesQuery() call 2016-02-23T18:07:00.754:package.d:__lambda5:140 consumeInput() 2016-02-23T18:07:00.754:package.d:__lambda5:145 getResult() 2016-02-23T18:07:00.754:package.d:__lambda5:145 getResult() 2016-02-23T18:07:00.755:app.d:__foreachbody18:160 ОШИБКА: ошибка синтаксиса (примерное положение: "wrong") LINE 1: wrong SQL statement ^ , skipping preparing of method wrong_sql_statement 2016-02-23T18:07:00.755:app.d:__foreachbody18:162 catched 2016-02-23T18:07:00.755:app.d:__foreachbody18:165 next Ошибка сегментирования (core dumped) 139 How how to understand why dub dustmite doesn't work for me?
Re: dub dustmite
On Friday, 12 December 2014 at 04:25:01 UTC, Vlad Levenfeld wrote: I'm trying to reduce a bug with dub dustmite feature and I must be doing it wrong somehow, my regular dub output looks like this: source/experimental.d(2403): Error: struct experimental.Product!(int[], int[]).Product no size yet for forward reference ulong[2] source/experimental.d(2454): Error: template instance experimental.Product!(int[], int[]) error instantiating source/experimental.d(2462):instantiated from here: by!(int[], int[]) FAIL .dub/build/application-debug-linux.posix-x86_64-dmd_2067-44246AA2375AB6C7D895600135F734E4/ engine_vx executable Error executing command run: dmd failed with exit code 1. and then when I run this command dub dustmite ~/dubdust --compiler-regex=Product no size yet I get Executing dustmite... None = No object.Exception@dustmite.d(243): Initial test fails It seems like a pretty simple case, I'm not sure what's going on. Try using --combined. This will test all packages at the same time if you have dependencies.
Re: dub dustmite
No luck, unfortunately.
dub dustmite
I'm trying to reduce a bug with dub dustmite feature and I must be doing it wrong somehow, my regular dub output looks like this: source/experimental.d(2403): Error: struct experimental.Product!(int[], int[]).Product no size yet for forward reference ulong[2] source/experimental.d(2454): Error: template instance experimental.Product!(int[], int[]) error instantiating source/experimental.d(2462):instantiated from here: by!(int[], int[]) FAIL .dub/build/application-debug-linux.posix-x86_64-dmd_2067-44246AA2375AB6C7D895600135F734E4/ engine_vx executable Error executing command run: dmd failed with exit code 1. and then when I run this command dub dustmite ~/dubdust --compiler-regex=Product no size yet I get Executing dustmite... None = No object.Exception@dustmite.d(243): Initial test fails It seems like a pretty simple case, I'm not sure what's going on.
Re: dub dustmite
On 2014-12-12 05:25, Vlad Levenfeld wrote: I get Executing dustmite... None = No object.Exception@dustmite.d(243): Initial test fails It seems like a pretty simple case, I'm not sure what's going on. I get the same error as well every time I use dustmite. At lease via Dub. -- /Jacob Carlborg