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

added attributes to common package #15520

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

WalterBright
Copy link
Member

No description provided.

@WalterBright WalterBright added Easy Review Refactoring No semantic changes to code labels Aug 8, 2023
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @WalterBright!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#15520"

Copy link
Contributor

@dkorpel dkorpel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functions that take a null terminated string don't have a safe interface and can't be @trusted

@WalterBright
Copy link
Member Author

@dkorpel true, but the functions are so entangled up the most reasonable path forward is to make everything @trusted and then one can work on the functions one by one to make them @safe.

@WalterBright WalterBright force-pushed the nothrowCommon branch 2 times, most recently from 0301f28 to ada1cca Compare August 9, 2023 01:41
@WalterBright WalterBright force-pushed the nothrowCommon branch 2 times, most recently from ba88386 to 6f1afb2 Compare August 22, 2023 21:03
@dkorpel
Copy link
Contributor

dkorpel commented Aug 23, 2023

You can still mark the caller of a function with an unsafe interface @trusted, there's no need to wrongly mark leaf functions @trusted since they don't untangle a circular dependency. Instead, that will only result in callers being @safe on false premises.

On a more general note, you started the "bulk mark everything @trusted and work back from there" approach in the backend, so far with little success: it's stuck in the @trusted phase without much resulting @safe from it. Therefore I'm not yet convinced this is the most reasonable path forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants