Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive

Conversation

@wilzbach
Copy link
Contributor

@wilzbach wilzbach commented Dec 2, 2017

This is already the way we build Phobos + Tools.
See also: dlang/phobos#5546

CC @ZombineDev @CyberShadow

@dlang-bot
Copy link
Contributor

dlang-bot commented Dec 2, 2017

Thanks for your pull request, @wilzbach!

Bugzilla references

Auto-close Bugzilla Severity Description
18530 regression [Reg 2.079] src/rt/tracegc.d(43): Deprecation: The delete keyword has been deprecated
19789 normal Lazy expression evaluation doesn't check parent scope for deprecations

Testing this PR locally

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

dub fetch digger
dub run digger -- build "master + druntime#1982"

@wilzbach wilzbach added the Trivial typos, formatting, comments label Dec 2, 2017
@CyberShadow
Copy link
Member

Sounds good, currently fails CI though.

@wilzbach
Copy link
Contributor Author

Sounds good, currently fails CI though.

Yeah:

src/core/time.d(4581): Deprecation: struct core.time.FracSec is deprecated - FracSec has been deprecated in favor of just using Duration for the sake of simplicity
src/core/time.d(3594): Error: template instance core.time._assertThrown!(TimeException, FracSec) error instantiating

Easy to fix.

src/core/internal/arrayop.d(147): Error: static assert  "Unary `-` not supported for type `ubyte`."

That one turns out to be rather difficult as it appears deep in the arrayop mixin :/

@wilzbach
Copy link
Contributor Author

Updated to resolve the merge conflicts and incorporate newer deprecations.
For delete dlang/dmd#8016 is required, apart from that I still haven't figured out how to fix the deprecation in arrayop.

@wilzbach wilzbach force-pushed the deprecation-error branch from dc7738d to ba520a3 Compare March 13, 2018 11:21
@dlang-bot dlang-bot added the Bug Fix Include reference to corresponding bugzilla issue label Mar 13, 2018
@JinShil JinShil mentioned this pull request Apr 4, 2019
@wilzbach wilzbach force-pushed the deprecation-error branch from ac588cb to b53d839 Compare April 4, 2019 11:06
@wilzbach wilzbach force-pushed the deprecation-error branch 2 times, most recently from 350c467 to 2c03d72 Compare April 4, 2019 11:42
@wilzbach wilzbach force-pushed the deprecation-error branch from 2c03d72 to b39d5d1 Compare April 4, 2019 11:44
alias UT = Args[idx - 1];
enum op = Args[idx][1 .. $];
static if (is(typeof((UT a) => mixin(op ~ " a")) RT == return))
static if (is(typeof((UT a) => mixin(op ~ "cast(int) a")) RT == return))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could also have used -preview=intpromote here, but as this wouldn't be there when any user code tries to use this, I went with the "safe" approach of explicitly using the existing behavior.

@wilzbach
Copy link
Contributor Author

wilzbach commented Apr 5, 2019

@thewilsonator @JinShil FYI - this is passing and ready ;-)

@thewilsonator thewilsonator merged commit d7b99e9 into dlang:master Apr 8, 2019
@quickfur
Copy link
Member

quickfur commented Apr 8, 2019

Heads up: this PR has caused a regression in my code. Trying to reduce it to minimal case now, will post details once I reduced it.

@quickfur
Copy link
Member

quickfur commented Apr 9, 2019

Regression filed: https://issues.dlang.org/show_bug.cgi?id=19796

This PR broke array ops (arr[] = -src[];).

@wilzbach wilzbach deleted the deprecation-error branch April 9, 2019 04:36
{
auto op = arg[0] == 'u' ? arg[1 .. $] : arg;
stack[$ - 1] = op ~ stack[$ - 1];
stack[$ - 1] = op ~ "cast(int)"~ stack[$ - 1];
Copy link
Member

Choose a reason for hiding this comment

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

This is the culprit. Deleting "cast(int)"~ fixes the problem.

I think there's a missing check that Args contains integral types! The cast causes problems when performing array ops on double[].

@wilzbach
Copy link
Contributor Author

wilzbach commented Apr 9, 2019

Regression filed: https://issues.dlang.org/show_bug.cgi?id=19796

Thanks -> #2550

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Bug Fix Include reference to corresponding bugzilla issue Trivial typos, formatting, comments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants