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

Problems with building in '--combined' mode #23

Open
cyrusmsk opened this issue Jan 24, 2023 · 4 comments
Open

Problems with building in '--combined' mode #23

cyrusmsk opened this issue Jan 24, 2023 · 4 comments

Comments

@cyrusmsk
Copy link

cyrusmsk commented Jan 24, 2023

If I add asdf to the empty dub project and run 'dub build' - it builds fine. But when I use 'dub build --combined' it gives me errors:

.dub/packages/mir-core-1.3.15/mir-core/source/mir/algebraic.d(1473,36): Error: pure function mir.algebraic.Algebraic!opEquals!().opEquals cannot call impure function mir.annotated.U!(Algebraic!(Ion_)).Annotated.opEquals
.dub/packages/mir-core-1.3.15/mir-core/source/mir/algebraic.d(1473,36): Error: @nogc function mir.algebraic.Algebraic!opEquals!().opEquals cannot call non-@nogc function mir.annotated.U!(Algebraic!(Ion_)).Annotated.opEquals
.dub/packages/mir-core-1.3.15/mir-core/source/mir/algebraic.d(1473,36): Error: function mir.annotated.U!(Algebraic!.opEquals is not nothrow
.dub/packages/mir-core-1.3.15/mir-core/source/mir/algebraic.d(1428,10): Error: function mir.algebraic.Algebraic!(Ion_).s!().opEquals may throw but is marked as nothrow
.dub/packages/mir-algorithm-3.18.4/mir-algorithm/source/mir/annotated.d(69,54): Error: template instance mir.algebraic.Algebraic.opEquals!() error instantiating
.dub/packages/mir-core-1.3.15/mir-core/source/mir/internal/meta.d(411,39): instantiated from here: U!(Algebraic!.dub/packages/mir-core-1.3.15/mir-core/source/mir/algebraic.d(857,36): 12 recursive instantiations from here: s!(isVariant, This, Algebraic!(Ion_), typeof(null), bool, long, double, string, Blob, Clob, Timestamp, This[], StringMap!!(This))
.dub/packages/mir-algorithm-3.18.4/mir-algorithm/source/mir/algebraic_alias/ion.d(60,22): instantiated from here: Algebraic!(Ion_)

Is it possible to fix that? So we can use asdf in '--combined' build?

@cyrusmsk
Copy link
Author

cyrusmsk commented Jan 25, 2023

How crucial is present the opEquals function as 'pure nothrow @nogc' for the project?

When I removed it in mir-core/algebraic.d and in mir-algorithm/string_map.d - my simple example with asdf was successfully compiled with 'dub build --combined'. But I don't know if it will cause any problems in other code.

Why I need '--combined' flag? It is because p0nce said, that without it the code generation from intel-intrinsics library is not working properly.

@9il
Copy link
Member

9il commented Jan 26, 2023

That is a compiler bug. I don't know what we can do about that.

@cyrusmsk
Copy link
Author

As a workaround solution it is possible to add 'pure nothrow @nogc' to opEquals implementation in mir-algorithm/annotated.d

@9il
Copy link
Member

9il commented Jan 26, 2023

Unfortunately, no, because it is a generic type, and underlaying may not satisfy the attributes.

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

2 participants