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

Latest mir-ion, mir-algorithm and mir-core do not build with any DMD version #41

Open
VPanteleev-S7 opened this issue Sep 10, 2023 · 1 comment

Comments

@VPanteleev-S7
Copy link

I'm trying to build a project which uses Mir, however, the build does not succeed. (I am guessing that it maybe succeeded with older versions of dub.selections.json but the project did not commit its lockfile.)

I reduced the build error to the following:

dmd \
	-I~/.dub/packages/mir-ion/2.2.0/mir-ion/source/ \
	-I~/.dub/packages/mir-algorithm/3.21.0/mir-algorithm/source/ \
	-I~/.dub/packages/mir-core/1.6.0/mir-core/source/ \
	~/.dub/packages/mir-ion/2.2.0/mir-ion/source/mir/yaml/internal/token.d \
	~/.dub/packages/mir-algorithm/3.21.0/mir-algorithm/source/mir/algebraic_alias/ion.d \
	~/.dub/packages/mir-core/1.6.0/mir-core/source/mir/algebraic.d

It fails with:

.../.dub/packages/mir-core/1.6.0/mir-core/source/mir/algebraic.d(1474): Error: `pure` function `mir.algebraic.Algebraic!(Ion_).Algebraic.opEquals!().opEquals` cannot call impure function `mir.annotated.U!(Algebraic!(Ion_)).Annotated.opEquals`
.../.dub/packages/mir-core/1.6.0/mir-core/source/mir/algebraic.d(1474): Error: `@nogc` function `mir.algebraic.Algebraic!(Ion_).Algebraic.opEquals!().opEquals` cannot call non-@nogc function `mir.annotated.U!(Algebraic!(Ion_)).Annotated.opEquals`
.../.dub/packages/mir-core/1.6.0/mir-core/source/mir/algebraic.d(1474): Error: function `mir.annotated.U!(Algebraic!(Ion_)).Annotated.opEquals` is not `nothrow`
.../.dub/packages/mir-core/1.6.0/mir-core/source/mir/algebraic.d(1429): Error: function `mir.algebraic.Algebraic!(Ion_).Algebraic.opEquals!().opEquals` may throw but is marked as `nothrow`
.../.dub/packages/mir-algorithm/3.21.0/mir-algorithm/source/mir/annotated.d(69): Error: template instance `mir.algebraic.Algebraic!(Ion_).Algebraic.opEquals!()` error instantiating
.../.dub/packages/mir-core/1.6.0/mir-core/source/mir/internal/meta.d(683):        instantiated from here: `U!(Algebraic!(Ion_))`
.../.dub/packages/mir-core/1.6.0/mir-core/source/mir/algebraic.d(858):        12 recursive instantiations from here: `ReplaceTypeUnless!(isVariant, This, Algebraic!(Ion_), typeof(null), bool, long, double, string, Blob, Clob, Timestamp, This[], StringMap!(This), Annotated!(This))`
.../.dub/packages/mir-algorithm/3.21.0/mir-algorithm/source/mir/algebraic_alias/ion.d(60):        instantiated from here: `Algebraic!(Ion_)`

I am not sure where the problem lies, but I tried all recent DMD releases and it doesn't work with any of them.

@VPanteleev-S7
Copy link
Author

Ah, this might be a DMD bug. If I reorder the files, it does compile successfully...

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

1 participant