Ticket #3115 (closed feature request: fixed)

Opened 4 years ago

Last modified 4 years ago

mark ghc.cabal so that unsuspecting newbies don't try to edit it

Reported by: nr Owned by:
Priority: normal Milestone: 6.12.1
Component: Build System Version: 6.11
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Please change the configure/build system so that (a) ghc.cabal is not writable and (b) it contains a comment at the top saying that people wishing to add source files to the compiler should extend file ghc.cabal.in and re-run ../configure; they should not edit ghc.cabal directly.

I know of two people who have fallen into this pit; let's not have any more.

Change History

Changed 4 years ago by simonmar

  • difficulty set to Unknown
  • milestone set to 6.12 branch

let's do this in the new build system.

Changed 4 years ago by guest

+ to informative comment

- to unwritable files, they're just annoying (eg: if you want to use rm -r rather than rm -rf because it has warning messages. Or if you know (for whatever reason) that you actually do want to edit ghc.cabal.) It doesn't seem to be the convention to make all generated files unwritable... But others could have a different opinion from me.

-Isaac Dupree

Changed 4 years ago by igloo

  • milestone changed from 6.12 branch to 6.12.1

Changed 4 years ago by simonmar

  • status changed from new to closed
  • resolution set to fixed

In the new build system I did this (the patch isn't in HEAD, it came in as part of the "new build system megapatch"):

Fri Apr 24 14:42:07 BST 2009  Simon Marlow <marlowsd@gmail.com>
  * Add warnings to the top of pre-processed files (#3115)
  I tried adding a preamble to the generated versions of these files
  using autoconf, but that turns out not to work very well.  You have to
  generate an intermediate file with the preamble, and then the
  intermediate file doesn't get updated if the original file changes.
Note: See TracTickets for help on using tickets.