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

DMD ~master fails to build vibe.d in unittest config #526

Closed
nazriel opened this issue Feb 14, 2014 · 13 comments
Closed

DMD ~master fails to build vibe.d in unittest config #526

nazriel opened this issue Feb 14, 2014 · 13 comments

Comments

@nazriel
Copy link
Contributor

nazriel commented Feb 14, 2014

dub --build=unittest --config=unittest

results in:

Building configuration "unittest", build type unittest
Compiling...
source/vibe/internal/meta/funcattr.d(162): Error: undefined identifier foo
source/vibe/internal/meta/funcattr.d(133): Error: template instance vibe.internal.meta.funcattr.__unittestL155_69.AttributedParameterMetadata!(bar) error instantiating
source/vibe/internal/meta/funcattr.d(167):        instantiated from here: IsAttributedParameter!(bar, "name1")
source/vibe/internal/meta/funcattr.d(167): Error: template instance vibe.internal.meta.funcattr.__unittestL155_69.IsAttributedParameter!(bar, "name1") error instantiating
source/vibe/internal/meta/funcattr.d(335): Error: undefined identifier attached1
source/vibe/internal/meta/funcattr.d(335): Error: undefined identifier attached2
source/vibe/internal/meta/funcattr.d(338): Error: template instance vibe.internal.meta.funcattr.__unittestL330_74.AttributedParameterMetadata!(foo) error instantiating
source/vibe/internal/meta/funcattr.d(721): Error: undefined identifier evaluator
source/vibe/internal/meta/funcattr.d(721): Error: undefined identifier evaluator
source/vibe/internal/meta/funcattr.d(721): Error: undefined identifier modificator
source/vibe/internal/meta/funcattr.d(777): Error: template instance vibe.internal.meta.funcattr.AttributedFunction!(sum, __T5GroupTAyaTAyaZ) error instantiating
source/vibe/internal/meta/funcattr.d(728):        instantiated from here: createAttributedFunction!(sum, string, string)
source/vibe/internal/meta/funcattr.d(728): Error: template instance vibe.internal.meta.funcattr.createAttributedFunction!(sum, string, string) error instantiating
source/vibe/internal/meta/funcattr.d(753): Error: undefined identifier evaluator
source/vibe/internal/meta/funcattr.d(753): Error: undefined identifier evaluator
source/vibe/internal/meta/funcattr.d(753): Error: undefined identifier modificator
source/vibe/internal/meta/funcattr.d(777): Error: template instance vibe.internal.meta.funcattr.AttributedFunction!(sum, __T5GroupTAyaTAyaZ) error instantiating
source/vibe/internal/meta/funcattr.d(759):        instantiated from here: createAttributedFunction!(sum, string, string)
source/vibe/internal/meta/funcattr.d(759): Error: template instance vibe.internal.meta.funcattr.createAttributedFunction!(sum, string, string) error instantiating
source/vibe/internal/meta/uda.d(72): Error: undefined identifier Attribute
source/vibe/internal/meta/uda.d(72): Error: undefined identifier Attribute
source/vibe/internal/meta/uda.d(75): Error: template instance vibe.internal.meta.uda.__unittestL68_84.findFirstUDA!(string, symbol) error instantiating
source/vibe/internal/meta/uda.d(100): Error: static assert  (is(result0.value == Attribute)) is false
Error: DMD compile run failed with exit code 1

Line at which DMD fails:

    @before!foo("name1")
    void bar(int name1, double name2)
    {
    }

Seems like some kind of regression related to UDAs?

I will try ~2.065 version in a minute.

Edit:
2.065 branch on github results in the same error.

@etcimon
Copy link
Contributor

etcimon commented Feb 14, 2014

dub --config=unittest fixes this.

I just tried a minute ago as well. I think vibe.d should try to support dub test because it makes it harder on my own unit tests.

@etcimon
Copy link
Contributor

etcimon commented Feb 14, 2014

but the resulting vibe-d.exe just runs in a loop, I'm not sure what it should do

@nazriel
Copy link
Contributor Author

nazriel commented Feb 14, 2014

@etcimon you are wrong here.

It isn't a fix, because without --build=unittest, unittests aren't run at all.
dub --config=unittest just picks up config-set from package.json

@s-ludwig
Copy link
Member

dub test is the intended way to run the vibe.d unit tests and is what the Travis CI job does. The equivalent call is dub --config=unittest --build=unittest in this case (although the "unittest" configuration isn't really necessary anymore with the advent of dub test and will be removed in a while).

But this DMD release seems to be the one with the most regressions hitting vibe.d up to date...

@nazriel: It would be great if you could file a regression report against DMD, this looks definitely like the error is there. I do what I can to test the betas and report errors there, but additionally testing git master is not an option for me right now.

@nazriel
Copy link
Contributor Author

nazriel commented Feb 14, 2014

@s-ludwig sure, will do!

Just want to try out LDC with 2.065-b3 merged [1] and see what happens.
Currently LDC ~master seems to have ICE while trying to unittest vibe.d hehe

After that I will try to create reports for both dmd and ldc.

Btw, I really need to update dub 👻

[1] http://forum.dlang.org/thread/dfwjrcodyviclocztfaf@forum.dlang.org

@nazriel
Copy link
Contributor Author

nazriel commented Feb 14, 2014

@s-ludwig
LOL @ DMD.

LDC with 2.065-b3 meged builds it fine.
So I guess someone introduced regression while cherry picking from ~master?

I am going to fill bug report now.

@etcimon
Copy link
Contributor

etcimon commented Feb 14, 2014

Using version (unittest) instead of unittest fixes most of these. Except the static assert in funcattr.d ln 324 : static assert (!__traits(compiles, AttributedParameterMetadata!bar));

@etcimon
Copy link
Contributor

etcimon commented Feb 14, 2014

And that's b/c the bar from another unittest is used for the assert.

@nazriel
Copy link
Contributor Author

nazriel commented Feb 14, 2014

@nazriel
Copy link
Contributor Author

nazriel commented Feb 14, 2014

Probably pull request responsible for regression:
dlang/dmd#3183

https://d.puremagic.com/issues/show_bug.cgi?id=12160#c2

@etcimon
Copy link
Contributor

etcimon commented Feb 14, 2014

Moving functions out of the unittest make the UDA check pass. Maybe they forgot to include unittests in their scope.

@etcimon
Copy link
Contributor

etcimon commented Feb 16, 2014

Fixed dlang/dmd#3266

Compilation of unittests work fine with dmd master now

@s-ludwig
Copy link
Member

Great, thanks for reporting! Now there is only one (known) regression left, that affects one of my vibe.d based projects (and a number of improvements w.r.t 2.064). Very relaxing to know that.

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

No branches or pull requests

3 participants