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

Multiple tests fail #16

Open
zorael opened this issue Jan 18, 2024 · 2 comments
Open

Multiple tests fail #16

zorael opened this issue Jan 18, 2024 · 2 comments

Comments

@zorael
Copy link

zorael commented Jan 18, 2024

EndeavourOS/Arch x86_64. dmd 2.107-beta.1, ldc 1.36.0.

Tests fails with nothrow errors.

[...]
Running ../../../home/zorael/.dub/packages/unit-threaded/2.1.2/unit-threaded/gen_ut_main -f bin/ut.d
/usr/include/dlang/dmd/std/traits.d(8602,53): Deprecation: `__traits(getAttributes)` may only be used for individual functions, not the overload set `hash_function`
/usr/include/dlang/dmd/std/traits.d(8602,53):        the result of `__traits(getOverloads)` may be used to select the desired function to extract attributes from
/usr/include/dlang/dmd/std/traits.d(8602,53): Deprecation: `__traits(getAttributes)` may only be used for individual functions, not the overload set `UseGCRanges`
/usr/include/dlang/dmd/std/traits.d(8602,53):        the result of `__traits(getOverloads)` may be used to select the desired function to extract attributes from
source/cachetools/cache2q.d(779,18): Error: function `cachetools.cache2q.Cache2Q!(int, string, Mallocator).Cache2Q.put` is not `nothrow`
source/cachetools/cache2q.d(775,5): Error: delegate `cachetools.cache2q.__unittest_L767_C1.__lambda4` may throw but is marked as `nothrow`
source/cachetools/cachelru.d(487,16): Error: function `cachetools.cachelru.CacheLRU!(int, string, Mallocator).CacheLRU.put` is not `nothrow`
source/cachetools/cachelru.d(489,16): Error: function `cachetools.cachelru.CacheLRU!(int, string, Mallocator).CacheLRU.put` is not `nothrow`
source/cachetools/cachelru.d(493,16): Error: function `cachetools.cachelru.CacheLRU!(int, string, Mallocator).CacheLRU.put` is not `nothrow`
source/cachetools/cachelru.d(485,5): Error: delegate `cachetools.cachelru.__unittest_L482_C15.__lambda2` may throw but is marked as `nothrow`
Warning: struct Rebindable has method toHash, however it cannot be called with const(Rebindable!(immutable(C))) this.
Rebindable.toHash defined here: /usr/include/dlang/dmd/object.d(137)
Error /usr/bin/dmd failed with exit code 1.
@ikod
Copy link
Owner

ikod commented Jan 19, 2024

Hello,

Something changed in dmd? Should I fix my code or wait for dmd release, not 2.107-beta.1 ?

@zorael
Copy link
Author

zorael commented Jan 19, 2024

There seems to have been some compiler change in dmd 2.101, released Nov 2022. Tests successfully complete with 2.100.2 but fail with 2.101.2.

$ mkdir -p ~/dlang && wget https://dlang.org/install.sh -O ~/dlang/install.sh
$ ~/dlang/install.sh update
$ ~/dlang/install.sh dmd-2.100.2
$ ~/dlang/install.sh dmd-2.101.2

$ dub test --compiler=$HOME/dlang/dmd-2.100.2/linux/bin64/dmd 2>&1 | grep Error
(no output)

$ dub test --compiler=$HOME/dlang/dmd-2.101.2/linux/bin64/dmd 2>&1 | grep Error
source/cachetools/cache2q.d(779,18): Error: function `cachetools.cache2q.Cache2Q!(int, string, Mallocator).Cache2Q.put` is not `nothrow`
source/cachetools/cache2q.d(775,5): Error: delegate `cachetools.cache2q.__unittest_L767_C1.__lambda4` may throw but is marked as `nothrow`
source/cachetools/cachelru.d(487,16): Error: function `cachetools.cachelru.CacheLRU!(int, string, Mallocator).CacheLRU.put` is not `nothrow`
source/cachetools/cachelru.d(489,16): Error: function `cachetools.cachelru.CacheLRU!(int, string, Mallocator).CacheLRU.put` is not `nothrow`
source/cachetools/cachelru.d(493,16): Error: function `cachetools.cachelru.CacheLRU!(int, string, Mallocator).CacheLRU.put` is not `nothrow`
source/cachetools/cachelru.d(485,5): Error: delegate `cachetools.cachelru.__unittest_L482_C15.__lambda2` may throw but is marked as `nothrow`
Error /home/zorael/dlang/dmd-2.101.2/linux/bin64/dmd failed with exit code 1.

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