Jump to page: 1 2
Thread overview
Beta 2.104.0
May 02, 2023
Iain Buclaw
May 02, 2023
zjh
May 02, 2023
Iain Buclaw
May 02, 2023
zjh
May 02, 2023
Basile B.
May 10, 2023
anonymouse
May 10, 2023
anonymouse
May 10, 2023
thinkunix
May 10, 2023
anonymouse
May 10, 2023
anonymouse
May 10, 2023
anonymouse
May 10, 2023
jmh530
May 10, 2023
anonymouse
May 10, 2023
max haughton
May 10, 2023
anonymouse
May 10, 2023
FeepingCreature
May 02, 2023

Glad to announce the first beta for the 2.104.0 release, ♥ to the 36 contributors.

This release comes with 11 major changes, including:

  • In the compiler, User Defined Attributes now parse template arguments.
  • In the standard library, std.typecons.Rebindable now supports all types
  • In dub, new properties cSourcePaths and cImportPaths have been added to pass C sources and add additional search paths for C headers to the compiler.

http://dlang.org/download.html#dmd_beta
http://dlang.org/changelog/2.104.0.html

As usual please report any bugs at
https://issues.dlang.org

-Iain
on behalf of the Dlang Core Team

May 02, 2023

On Tuesday, 2 May 2023 at 00:34:45 UTC, Iain Buclaw wrote:

>

Glad to announce the first beta for the 2.104.0 release, ♥ to the 36 contributors.

104

alias Tint = int;
@Tint void f();

Here says not to use basic types as attributes, but the following example give it another basic type?

@int void f();
May 02, 2023

On Tuesday, 2 May 2023 at 03:08:00 UTC, zjh wrote:

>

On Tuesday, 2 May 2023 at 00:34:45 UTC, Iain Buclaw wrote:

>

Glad to announce the first beta for the 2.104.0 release, ♥ to the 36 contributors.

104

alias Tint = int;
@Tint void f();

Here says not to use basic types as attributes, but the following example give it another basic type?

@int void f();

The keyword here in the changelog is: would; that is to say, the compiler previously rejected basic types, but now they are accepted.

>

It was already allowed to put types in UDAs, but the parser would reject basic types written directly, requiring the use of an alias.

I'll have a think about how that entry could be rephrased to avoid confusion, though you are welcome to raise your own pull request to clarify the wording.

May 02, 2023

On Tuesday, 2 May 2023 at 08:47:35 UTC, Iain Buclaw wrote:

>

..

Thank you for your reply. I understand it.

May 02, 2023

On Tuesday, 2 May 2023 at 08:47:35 UTC, Iain Buclaw wrote:

>

On Tuesday, 2 May 2023 at 03:08:00 UTC, zjh wrote:

>

On Tuesday, 2 May 2023 at 00:34:45 UTC, Iain Buclaw wrote:

>

Glad to announce the first beta for the 2.104.0 release, ♥ to the 36 contributors.

104

alias Tint = int;
@Tint void f();

Here says not to use basic types as attributes, but the following example give it another basic type?

@int void f();

The keyword here in the changelog is: would; that is to say, the compiler previously rejected basic types, but now they are accepted.

>

It was already allowed to put types in UDAs, but the parser would reject basic types written directly, requiring the use of an alias.

I'll have a think about how that entry could be rephrased to avoid confusion, though you are welcome to raise your own pull request to clarify the wording.

That's a half baked change, it would have been better to go a bit further:

previously

alias Tint = int;
@Tint void f();

now

@int void f();

nice. But previously

alias Tint = int;
@Tint(1) void f();

now

@int(1) void f(); // Not Good

that's unfortunately still an error.

May 10, 2023

On Tuesday, 2 May 2023 at 00:34:45 UTC, Iain Buclaw wrote:

>

Glad to announce the first beta for the 2.104.0 release, ♥ to the 36 contributors.

A couple days ago I ran into an issue that was solved by https://issues.dlang.org/show_bug.cgi?id=23846 so I upgraded to this beta. I just initialized a dub project to try to use mir.stat

import std.stdio;
import mir.stat;

void main()
{
	writeln("Edit source/app.d to start your project.");
}

and ran into the following linker errors:

(dmd-2.104.0-beta.1)confuzzled@confuzzleds-MBP stat % dub
    Starting Performing "debug" build using /Users/confuzzled/dlang/dmd-2.104.0-beta.1/osx/bin/dmd for x86_64.
  Up-to-date mir-core 1.5.5: target for configuration [library] is up to date.
  Up-to-date mir-algorithm 3.20.2: target for configuration [default] is up to date.
  Up-to-date mir-stat 0.1.6: target for configuration [library] is up to date.
    Building stat ~master: building configuration [application]
     Linking stat
ld: warning: alignment (1) of atom 'anon' is too small and may result in unaligned pointers
[SNIP same ld error repeated 1697 times]
ld: warning: alignment (1) of atom 'anon' is too small and may result in unaligned pointers
ld: warning: pointer not aligned at address 0x10006C2A1 ('anon' + 673 from /Users/confuzzled/.dub/cache/stat/~master/build/application-debug-d2OWm2um2jTdPTUfJ52drA/stat.o)
ld: warning: pointer not aligned at address 0x10006C2BE ('anon' + 702 from /Users/confuzzled/.dub/cache/stat/~master/build/application-debug-d2OWm2um2jTdPTUfJ52drA/stat.o)
ld: warning: pointer not aligned at address 0x10006C3A1 ('anon' + 929 from /Users/confuzzled/.dub/cache/stat/~master/build/application-debug-d2OWm2um2jTdPTUfJ52drA/stat.o)
ld: warning: pointer not aligned at address 0x10006C3E9 ('anon' + 1001 from /Users/confuzzled/.dub/cache/stat/~master/build/application-debug-d2OWm2um2jTdPTUfJ52drA/stat.o)
ld: warning: pointer not aligned at address 0x10006C43F ('anon' + 1087 from /Users/confuzzled/.dub/cache/stat/~master/build/application-debug-d2OWm2um2jTdPTUfJ52drA/stat.o)
ld: warning: pointer not aligned at address 0x10006C47A ('anon' + 1146 from /Users/confuzzled/.dub/cache/stat/~master/build/application-debug-d2OWm2um2jTdPTUfJ52drA/stat.o)
ld: warning: pointer not aligned at address 0x10006C496 ('anon' + 1174 from /Users/confuzzled/.dub/cache/stat/~master/build/application-debug-d2OWm2um2jTdPTUfJ52drA/stat.o)
ld: warning: pointer not aligned at address 0x10006C4D2 ('anon' + 1234 from /Users/confuzzled/.dub/cache/stat/~master/build/application-debug-d2OWm2um2jTdPTUfJ52drA/stat.o)
ld: warning: pointer not aligned at address 0x10006C6FD ('anon' + 122 from ../../.dub/cache/mir-algorithm/3.20.2/build/default-debug-R1enIlTUL3xo2uXB-nJMrg/libmir-algorithm.a(lifetime_fd_8f7.o))
ld: warning: pointer not aligned at address 0x10006C8A3 ('anon' + 127 from ../../.dub/cache/mir-algorithm/3.20.2/build/default-debug-R1enIlTUL3xo2uXB-nJMrg/libmir-algorithm.a(hash_114_3c9.o))
ld: warning: pointer not aligned at address 0x10006C93B ('anon' + 127 from ../../.dub/cache/mir-algorithm/3.20.2/build/default-debug-R1enIlTUL3xo2uXB-nJMrg/libmir-algorithm.a(hash_125_58c.o))
ld: warning: pointer not aligned at address 0x10006CAB9 ('anon' + 139 from ../../.dub/cache/mir-algorithm/3.20.2/build/default-debug-R1enIlTUL3xo2uXB-nJMrg/libmir-algorithm.a(comparison_186_3bd.o))
ld: warning: pointer not aligned at address 0x10006CB56 ('anon' + 129 from ../../.dub/cache/mir-algorithm/3.20.2/build/default-debug-R1enIlTUL3xo2uXB-nJMrg/libmir-algorithm.a(string_187_36f.o))
ld: warning: pointer not aligned at address 0x10006CC9D ('anon' + 142 from ../../.dub/cache/mir-algorithm/3.20.2/build/default-debug-R1enIlTUL3xo2uXB-nJMrg/libmir-algorithm.a(concatenation_219_e62.o))
ld: warning: pointer not aligned at address 0x10006CD67 ('anon' + 137 from ../../.dub/cache/mir-algorithm/3.20.2/build/default-debug-R1enIlTUL3xo2uXB-nJMrg/libmir-algorithm.a(capacity_21a_11f9.o))
ld: warning: pointer not aligned at address 0x10006CE0F ('anon' + 142 from ../../.dub/cache/mir-algorithm/3.20.2/build/default-debug-R1enIlTUL3xo2uXB-nJMrg/libmir-algorithm.a(concatenation_21b_1145.o))
ld: warning: pointer not aligned at address 0x10006CFE2 ('anon' + 151 from ../../.dub/cache/mir-algorithm/3.20.2/build/default-debug-R1enIlTUL3xo2uXB-nJMrg/libmir-algorithm.a(atomic_2d0_104b.o))
ld: warning: pointer not aligned at address 0x10006D191 ('anon' + 127 from ../../.dub/cache/mir-core/1.5.5/build/library-debug-6QbncWne9XfURo0c-rzF0g/libmir-core.a(hash_30_76c.o))
ld: unaligned pointer(s) for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error: linker exited with status 1
Error /Users/confuzzled/dlang/dmd-2.104.0-beta.1/osx/bin/dmd failed with exit code 1.
May 10, 2023

On Wednesday, 10 May 2023 at 02:48:02 UTC, anonymouse wrote:

>

On Tuesday, 2 May 2023 at 00:34:45 UTC, Iain Buclaw wrote:

>

Glad to announce the first beta for the 2.104.0 release, ♥ to the 36 contributors.

A couple days ago I ran into an issue that was solved by https://issues.dlang.org/show_bug.cgi?id=23846 so I upgraded to this beta.

Note: The same does not happen with LDC

(ldc-1.32.1)confuzzled@confuzzleds-MBP stat % dub
    Starting Performing "debug" build using /Users/confuzzled/dlang/ldc-1.32.1/bin/ldc2 for x86_64.
    Building mir-core 1.5.5: building configuration [library]
    Building mir-algorithm 3.20.2: building configuration [default]
    Building mir-stat 0.1.6: building configuration [library]
    Building stat ~master: building configuration [application]
     Linking stat
     Running stat
Edit source/app.d to start your project.
May 09, 2023
anonymouse via Digitalmars-d-announce wrote:
> On Tuesday, 2 May 2023 at 00:34:45 UTC, Iain Buclaw wrote:
>> Glad to announce the first beta for the 2.104.0 release, ♥ to the 36 contributors.
> 
> A couple days ago I ran into an issue that was solved by https://issues.dlang.org/show_bug.cgi?id=23846 so I upgraded to this beta. I just initialized a dub project to try to use ```mir.stat```
> 
> ```D
> import std.stdio;
> import mir.stat;
> 
> void main()
> {
>      writeln("Edit source/app.d to start your project.");
> }
> ```
> and ran into the following linker errors:
> 
> ```
> (dmd-2.104.0-beta.1)confuzzled@confuzzleds-MBP stat % dub
>      Starting Performing "debug" build using /Users/confuzzled/dlang/dmd-2.104.0-beta.1/osx/bin/dmd for x86_64.
>    Up-to-date mir-core 1.5.5: target for configuration [library] is up to date.
>    Up-to-date mir-algorithm 3.20.2: target for configuration [default] is up to date.
>    Up-to-date mir-stat 0.1.6: target for configuration [library] is up to date.
>      Building stat ~master: building configuration [application]
>       Linking stat
> ld: warning: alignment (1) of atom 'anon' is too small and may result in unaligned pointers
> [SNIP same ld error repeated 1697 times]
> ld: warning: alignment (1) of atom 'anon' is too small and may result in unaligned pointers
> ld: warning: pointer not aligned at address 0x10006C2A1 ('anon' + 673 from /Users/confuzzled/.dub/cache/stat/~master/build/application-debug-d2OWm2um2jTdPTUfJ52drA/stat.o) 
> 
> ld: warning: pointer not aligned at address 0x10006C2BE ('anon' + 702 from /Users/confuzzled/.dub/cache/stat/~master/build/application-debug-d2OWm2um2jTdPTUfJ52drA/stat.o) 
> 
> ld: warning: pointer not aligned at address 0x10006C3A1 ('anon' + 929 from /Users/confuzzled/.dub/cache/stat/~master/build/application-debug-d2OWm2um2jTdPTUfJ52drA/stat.o) 
> 
> ld: warning: pointer not aligned at address 0x10006C3E9 ('anon' + 1001 from /Users/confuzzled/.dub/cache/stat/~master/build/application-debug-d2OWm2um2jTdPTUfJ52drA/stat.o) 
> 
> ld: warning: pointer not aligned at address 0x10006C43F ('anon' + 1087 from /Users/confuzzled/.dub/cache/stat/~master/build/application-debug-d2OWm2um2jTdPTUfJ52drA/stat.o) 
> 
> ld: warning: pointer not aligned at address 0x10006C47A ('anon' + 1146 from /Users/confuzzled/.dub/cache/stat/~master/build/application-debug-d2OWm2um2jTdPTUfJ52drA/stat.o) 
> 
> ld: warning: pointer not aligned at address 0x10006C496 ('anon' + 1174 from /Users/confuzzled/.dub/cache/stat/~master/build/application-debug-d2OWm2um2jTdPTUfJ52drA/stat.o) 
> 
> ld: warning: pointer not aligned at address 0x10006C4D2 ('anon' + 1234 from /Users/confuzzled/.dub/cache/stat/~master/build/application-debug-d2OWm2um2jTdPTUfJ52drA/stat.o) 
> 
> ld: warning: pointer not aligned at address 0x10006C6FD ('anon' + 122 from ../../.dub/cache/mir-algorithm/3.20.2/build/default-debug-R1enIlTUL3xo2uXB-nJMrg/libmir-algorithm.a(lifetime_fd_8f7.o)) 
> 
> ld: warning: pointer not aligned at address 0x10006C8A3 ('anon' + 127 from ../../.dub/cache/mir-algorithm/3.20.2/build/default-debug-R1enIlTUL3xo2uXB-nJMrg/libmir-algorithm.a(hash_114_3c9.o)) 
> 
> ld: warning: pointer not aligned at address 0x10006C93B ('anon' + 127 from ../../.dub/cache/mir-algorithm/3.20.2/build/default-debug-R1enIlTUL3xo2uXB-nJMrg/libmir-algorithm.a(hash_125_58c.o)) 
> 
> ld: warning: pointer not aligned at address 0x10006CAB9 ('anon' + 139 from ../../.dub/cache/mir-algorithm/3.20.2/build/default-debug-R1enIlTUL3xo2uXB-nJMrg/libmir-algorithm.a(comparison_186_3bd.o)) 
> 
> ld: warning: pointer not aligned at address 0x10006CB56 ('anon' + 129 from ../../.dub/cache/mir-algorithm/3.20.2/build/default-debug-R1enIlTUL3xo2uXB-nJMrg/libmir-algorithm.a(string_187_36f.o)) 
> 
> ld: warning: pointer not aligned at address 0x10006CC9D ('anon' + 142 from ../../.dub/cache/mir-algorithm/3.20.2/build/default-debug-R1enIlTUL3xo2uXB-nJMrg/libmir-algorithm.a(concatenation_219_e62.o)) 
> 
> ld: warning: pointer not aligned at address 0x10006CD67 ('anon' + 137 from ../../.dub/cache/mir-algorithm/3.20.2/build/default-debug-R1enIlTUL3xo2uXB-nJMrg/libmir-algorithm.a(capacity_21a_11f9.o)) 
> 
> ld: warning: pointer not aligned at address 0x10006CE0F ('anon' + 142 from ../../.dub/cache/mir-algorithm/3.20.2/build/default-debug-R1enIlTUL3xo2uXB-nJMrg/libmir-algorithm.a(concatenation_21b_1145.o)) 
> 
> ld: warning: pointer not aligned at address 0x10006CFE2 ('anon' + 151 from ../../.dub/cache/mir-algorithm/3.20.2/build/default-debug-R1enIlTUL3xo2uXB-nJMrg/libmir-algorithm.a(atomic_2d0_104b.o)) 
> 
> ld: warning: pointer not aligned at address 0x10006D191 ('anon' + 127 from ../../.dub/cache/mir-core/1.5.5/build/library-debug-6QbncWne9XfURo0c-rzF0g/libmir-core.a(hash_30_76c.o)) 
> 
> ld: unaligned pointer(s) for architecture x86_64
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
> Error: linker exited with status 1
> Error /Users/confuzzled/dlang/dmd-2.104.0-beta.1/osx/bin/dmd failed with exit code 1.
> ```

I ran into the same issue in the bug you referenced,
"...number `0x0.8p-126f` is not representable as a `float`"
trying to build phobos on an older Linux x86_64 system after
dmd-2.102.2 was released.

After I saw your email yesterday about the bug, I upgraded to
dmd-2.104.0-beta.1 and phobos built.  Thanks for you post!

While I don't have an answer to your current problem, I can say
that I just ran this test build on my system that had the problem
and it worked:

$ dub --version
DUB version 1.31.1, built on Feb 17 2023

$ dmd --version
DMD64 D Compiler v2.104.0-beta.1

Copyright (C) 1999-2023 by The D Language Foundation, All Rights Reserved written by Walter Bright


$ mkdir mirstat
$ cd mirstat
$ dub init -t minimal		## accept all defaults
$ vi source/app.d		## add "import mir.stat;"

$ dub add mir-stat
             Adding dependency mir-stat ~>0.1.6

$ cat dub.json
{
        "authors": [
                "thinkunix"
        ],
        "copyright": "Copyright © 2023, jenkins",
        "dependencies": {
                "mir-stat": "~>0.1.6"
        },
        "description": "A minimal D application.",
        "license": "proprietary",
        "name": "mirstat"
}

$ dub
    Starting Performing "debug" build using /usr/bin/dmd for x86_64.
  Up-to-date mir-core 1.5.5: target for configuration [library] is up to date.
  Up-to-date mir-algorithm 3.20.2: target for configuration [default] is up to date.
  Up-to-date mir-stat 0.1.6: target for configuration [library] is up to date.
    Building mirstat ~master: building configuration [application]
     Linking mirstat
    Finished To force a rebuild of up-to-date targets, run again with --force
     Running mirstat
Edit source/app.d to start your project.


Not sure if that helps, but it shows this works with dmd-2.104.0-beta.1
at least on Linux x86_64.

scot
May 10, 2023

On Wednesday, 10 May 2023 at 03:31:05 UTC, thinkunix wrote:

>

Not sure if that helps, but it shows this works with dmd-2.104.0-beta.1
at least on Linux x86_64.

scot

I think that worked for you because although you have set mirstat as a dependency, you are not actually linking against it. Try import mir.stat; into app.d and rebuild.

-- anonymouse

May 10, 2023

On Wednesday, 10 May 2023 at 03:57:59 UTC, anonymouse wrote:

>

On Wednesday, 10 May 2023 at 03:31:05 UTC, thinkunix wrote:

>

Not sure if that helps, but it shows this works with dmd-2.104.0-beta.1
at least on Linux x86_64.

scot

I think that worked for you because although you have set mirstat as a dependency, you are not actually linking against it. Try import mir.stat; into app.d and rebuild.

-- anonymouse

Also it might be a macOS specific issue since the original problems I faced didn't materialize on my Debian 11 VM.

« First   ‹ Prev
1 2