Re: how to make pragma(lib)'s path relative to the package's path?

2023-07-30 Thread ryuukk_ via Digitalmars-d-learn
I reworked the PR, here is the new link: 
https://github.com/dlang/dmd/pull/15479


It basically add support for ``pragma(lib, "local:bin/lib.a");``

Makes things easier, and doesn't change any old behavior


Re: how to make pragma(lib)'s path relative to the package's path?

2023-07-30 Thread ryuukk_ via Digitalmars-d-learn
I offered a workaround to this problem as a PR, if everyone is 
interested in providing feedback, here is the link: 
https://github.com/dlang/dmd/pull/15478


Re: Is there any place where i can check current status and plans for -preview flags?

2023-07-30 Thread ryuukk_ via Digitalmars-d-learn
I'm interesting in that as well, i use 
``-preview=rvaluerefparam`` in all of my projects, i can't live 
without it, i would love to know about its state and if it'll be 
merged as a official feature (hopefully not removed lol), i'm in 
the process of simpifying all of my builds scripts right now, 
removing one more flag would be cool


Re: pragma lib doesn't support static libraries?

2023-07-30 Thread ryuukk_ via Digitalmars-d-learn

On Sunday, 30 July 2023 at 15:40:08 UTC, Adam D Ruppe wrote:

On Sunday, 30 July 2023 at 05:53:55 UTC, Mike Parker wrote:
And I'm unaware of any mechanism for embedding static library 
names in an object file for a linker to read later.


There is a mechanism on Windows, so it tends to work there, but 
yeah no luck on the other platforms.


Apparently it works on linux with LDC 
https://github.com/ldc-developers/ldc/issues/4459#issuecomment-1657200236





Re: pragma lib doesn't support static libraries?

2023-07-30 Thread Adam D Ruppe via Digitalmars-d-learn

On Sunday, 30 July 2023 at 05:53:55 UTC, Mike Parker wrote:
And I'm unaware of any mechanism for embedding static library 
names in an object file for a linker to read later.


There is a mechanism on Windows, so it tends to work there, but 
yeah no luck on the other platforms.


Is there any place where i can check current status and plans for -preview flags?

2023-07-30 Thread Dmytro Katyukha via Digitalmars-d-learn

Hi all!

I would like to know current status and future plans for compiler 
preview flags like `-preview=in` and `-preview=dip1000`.

So, if have following questions:
- Is there any place where i could info about current status and 
future plans on these flags?

- What is the current status of these flags?
- When it is planned to enable them by default?
- Is there any description about what have to be done to make 
this flags enabled by default?
- What if i would like to create some lib that rely on these 
flags: is it ok, if i enable these flags for that lib by default?



The reason i am askin, is because part of standard library is 
@safe only if compiled with `-preview=dip1000` flag. For example, 
[std.file.dirEntries](https://dlang.org/phobos/std_file.html#dirEntries) function is safe only when dip1000 preview switch enabled, otherwise it is system.


Re: dub Fetches Wrong Package Version

2023-07-30 Thread Ruby The Roobster via Digitalmars-d-learn

On Saturday, 29 July 2023 at 17:11:50 UTC, Dennis wrote:
On Saturday, 29 July 2023 at 16:47:34 UTC, Ruby The Roobster 
wrote:
Dub refuses to fetch the ~master branch of a package, even 
when dub.json tells it to.  Is there any workaround to this?


Delete dub.selections.json, which locks in dependency versions 
until you explicitly upgrade.


Thank you.  Also, editing dub.selections.json to have the right 
version also works.


Re: pragma lib doesn't support static libraries?

2023-07-30 Thread ryuukk_ via Digitalmars-d-learn

On Sunday, 30 July 2023 at 05:53:55 UTC, Mike Parker wrote:

On Sunday, 30 July 2023 at 05:28:32 UTC, ryuukk_ wrote:

I should have explained exactly what i am doing..

Looks like it doesn't work when i compile in 2 step

- compile with: ``dmd -c of=bin/game.o``
- link with: ``dmd bin/game.o``

When doing it this way, then it doesn't work

However, when compiling/linking in one ``dmd`` invocation 
(without ``-c``), then it all works


So it looks like the pragma is not passed on the linked when 
it was compiled with ``-c``


Is this a bug? should i report it?, or is that the expected 
behavior?


It's expected behavior. There's no link step in the first 
command, so the pragma is meaningless there. And I'm unaware of 
any mechanism for embedding static library names in an object 
file for a linker to read later.


Oh ok, i'll stick to a one command invocation then, it'll further 
simplify my build script