Opened 4 years ago

Closed 6 months ago

#8440 closed task (fixed)

Get rid of the remaining static flags

Reported by: thoughtpolice Owned by:
Priority: normal Milestone: 8.2.1
Component: Compiler Version:
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D2839, Phab:D3615
Wiki Page:

Description

On the heels of fixing #8276, we should get rid of the remaining static flags. For the remaining cases, there's no real reason they should be static, other than changing them is fairly invasive and will require some refactoring.

I'm making this a goal for 7.10, since we only have 5 flags left (and a lot of the changes for them are overlapping, so fixing one will probably go a ways towards fixing the others.)

Change History (14)

comment:1 Changed 4 years ago by thoughtpolice

Milestone: 7.8.37.10.1

comment:2 Changed 3 years ago by dfeuer

Milestone: 7.10.17.12.1

comment:3 Changed 2 years ago by thoughtpolice

Milestone: 7.12.18.0.1

Milestone renamed

comment:4 Changed 2 years ago by siddhanathan

Owner: set to siddhanathan

comment:5 Changed 2 years ago by bgamari

Milestone: 8.0.18.2.1
Priority: highnormal

This doesn't appear to be critical for 8.0.

comment:6 Changed 12 months ago by mpickering

Owner: siddhanathan deleted

comment:7 Changed 11 months ago by bgamari

Milestone: 8.2.18.4.1

It is unlikely this will happen for 8.2.

comment:8 Changed 11 months ago by bgamari

Differential Rev(s): Phab:D2839
Status: newpatch

Yay, hsyl20 picked this up!

comment:9 Changed 10 months ago by Ben Gamari <ben@…>

In bbd3c39/ghc:

Ditch static flags

This patch converts the 4 lasting static flags (read from the command
line and unsafely stored in immutable global variables) into dynamic
flags. Most use cases have been converted into reading them from a DynFlags.

In cases for which we don't have easy access to a DynFlags, we read from
'unsafeGlobalDynFlags' that is set at the beginning of each 'runGhc'.
It's not perfect (not thread-safe) but it is still better as we can
set/unset these 4 flags before each run when using GHC API.

Updates haddock submodule.

Rebased and finished by: bgamari

Test Plan: validate

Reviewers: goldfire, erikd, hvr, austin, simonmar, bgamari

Reviewed By: simonmar

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2839

GHC Trac Issues: #8440

comment:10 Changed 10 months ago by bgamari

Milestone: 8.4.18.2.1
Resolution: fixed
Status: patchclosed

It's finally done! Thanks hsyl20!

comment:11 Changed 6 months ago by RyanGlScott

Resolution: fixed
Status: closednew

Oops, it looks like there are still a couple of references to static flags in the flag reference. I've submitted Phab:D3615 for this.

comment:12 Changed 6 months ago by RyanGlScott

Differential Rev(s): Phab:D2839Phab:D2839, Phab:D3615
Status: newpatch

comment:13 Changed 6 months ago by Ben Gamari <ben@…>

In bf775e9/ghc:

Remove references to static flags in flag reference

A follow-up to #8440 (Ditch static flags). There are still some
lingering references to static flags in the flag reference, so let's
modify those references accordingly.

Test Plan: Build the documentation

Reviewers: bgamari, austin

Reviewed By: bgamari

Subscribers: rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3615

comment:14 Changed 6 months ago by bgamari

Resolution: fixed
Status: patchclosed
Note: See TracTickets for help on using tickets.