Re: [GHC] #7478: setSessionDynFlags does not always work

2012-12-07 Thread GHC
#7478: setSessionDynFlags does not always work
-+--
Reporter:  edsko |   Owner:  simonmar
Type:  bug   |  Status:  new 
Priority:  normal|   Milestone:  7.6.2   
   Component:  Compiler  | Version:  7.6.1   
Keywords:|  Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  | Failure:  None/Unknown
  Difficulty:  Unknown   |Testcase:  
   Blockedby:|Blocking:  
 Related:|  
-+--
Changes (by simonmar):

  * owner:  = simonmar
  * difficulty:  = Unknown
  * milestone:  = 7.6.2


Comment:

 You're getting the `DynFlags` from the cached `ModSummary`.  I think
 there's an easy fix: we should discard the cache in `setSessionDynFlags`.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7478#comment:3
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #7478: setSessionDynFlags does not always work

2012-12-07 Thread GHC
#7478: setSessionDynFlags does not always work
-+--
Reporter:  edsko |   Owner:  simonmar
Type:  bug   |  Status:  new 
Priority:  normal|   Milestone:  7.6.2   
   Component:  Compiler  | Version:  7.6.1   
Keywords:|  Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  | Failure:  None/Unknown
  Difficulty:  Unknown   |Testcase:  
   Blockedby:|Blocking:  
 Related:|  
-+--

Comment(by marlowsd@…):

 commit 27770ae5c5ebd16d9f6cc4574e0f75c395e12720
 {{{
 Author: Simon Marlow marlo...@gmail.com
 Date:   Fri Dec 7 12:05:29 2012 +

 Invalidate the ModSummary cache in setSessionDynFlags (#7478)

  compiler/main/GHC.hs |   27 +++
  1 files changed, 27 insertions(+), 0 deletions(-)
 }}}

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7478#comment:4
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #7478: setSessionDynFlags does not always work

2012-12-07 Thread GHC
#7478: setSessionDynFlags does not always work
-+--
Reporter:  edsko |   Owner:  simonmar
Type:  bug   |  Status:  merge   
Priority:  normal|   Milestone:  7.6.2   
   Component:  Compiler  | Version:  7.6.1   
Keywords:|  Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  | Failure:  None/Unknown
  Difficulty:  Unknown   |Testcase:  ghc-api/T7478   
   Blockedby:|Blocking:  
 Related:|  
-+--
Changes (by simonmar):

  * status:  new = merge
  * testcase:  = ghc-api/T7478


-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7478#comment:5
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #7478: setSessionDynFlags does not always work

2012-12-07 Thread GHC
#7478: setSessionDynFlags does not always work
---+
  Reporter:  edsko |  Owner:  simonmar
  Type:  bug   | Status:  closed  
  Priority:  normal|  Milestone:  7.6.2   
 Component:  Compiler  |Version:  7.6.1   
Resolution:  fixed |   Keywords:  
Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown  | Difficulty:  Unknown 
  Testcase:  ghc-api/T7478 |  Blockedby:  
  Blocking:|Related:  
---+
Changes (by igloo):

  * status:  merge = closed
  * resolution:  = fixed


Comment:

 Merged as 16ba75714cc22aeb86425679ad24b996a2b30fea

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7478#comment:6
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


[GHC] #7478: setSessionDynFlags does not always work

2012-12-04 Thread GHC
#7478: setSessionDynFlags does not always work
-+--
Reporter:  edsko |  Owner:  
Type:  bug   | Status:  new 
Priority:  normal|  Component:  Compiler
 Version:  7.6.1 |   Keywords:  
  Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
 Failure:  None/Unknown  |  Blockedby:  
Blocking:|Related:  
-+--
 The attached test case runs GHC in a separate thread (with a single call
 to `runGhc` when the thread is started), waiting for compile requests on
 one channel and outputting done on another. Requests consist of a list
 of filenames to compile. These file names are added as targets and then
 `load LoadAddTargets` is called.

 On every request we also call `setSessionDynFlags` with a different
 `log_action`. On the first request the `log_action` is set to `dispatcher
 0` (defined in `forkGhc`), on the second request the `log_action` is set
 to `dispatcher 1`, and so on. This dispatcher just outputs the messages it
 receives from GHC, along with this integer; hence, all messages from the
 first request should include the integer 0, all messages from the second
 request should include the integer 1, and so on. However, when the program
 is run (in a directory containing all the specified source files), the
 output is

 {{{
 - 0 --
 (0,[1 of 2] Compiling B( B.hs, B.o ))
 (0,[2 of 2] Compiling Main ( A.hs, A.o ))
 - 1 --
 (0,[2 of 2] Compiling Main ( A.hs, A.o ))
 - 2 --
 (2,[1 of 1] Compiling Main ( C.hs, C.o ))
 (2,Linking A ...)
 }}}

 On the first request we ask Ghc to compile A.hs and B.hs; A.hs here
 depends on B.hs, which is compiled first, but A.hs contains an error and
 cannot be compiled. Then on the second request we ask GHC to compile A.hs
 and B.hs again; since B.hs is already compiled it only tries to compile
 A.hs, but this still fails. On the third request we ask Ghc to compile
 C.hs, an independent source file.

 Note that the integer listed for the second request is ''0'', not ''1''.
 For some reason the `setSessionDynFlags` does not seem to affect the
 recompilation of A.hs, even though when we compile C.hs in the third
 request, the output is ''2'', as expected.

 (This bug also occurs in GHC 7.4, but the API is slightly different so
 some minor modifications to to the code need to be made.)

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7478
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #7478: setSessionDynFlags does not always work

2012-12-04 Thread GHC
#7478: setSessionDynFlags does not always work
-+--
Reporter:  edsko |  Owner:  
Type:  bug   | Status:  new 
Priority:  normal|  Component:  Compiler
 Version:  7.6.1 |   Keywords:  
  Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
 Failure:  None/Unknown  |  Blockedby:  
Blocking:|Related:  
-+--

Comment(by edsko):

 Trac gave a database locked error when I uploaded B.hs; when I tried
 uploading it again, it added B.2.hs and then B.3.hs, even though it's
 not showing B.hs as being uploaded -- nor can I remove any of these
 files. Sigh. Please rename B.2.hs to B.hs before running the test.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7478#comment:1
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #7478: setSessionDynFlags does not always work

2012-12-04 Thread GHC
#7478: setSessionDynFlags does not always work
-+--
Reporter:  edsko |  Owner:  
Type:  bug   | Status:  new 
Priority:  normal|  Component:  Compiler
 Version:  7.6.1 |   Keywords:  
  Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
 Failure:  None/Unknown  |  Blockedby:  
Blocking:|Related:  
-+--

Comment(by edsko):

 Added a version of the the test that doesn't use concurrency/channels.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7478#comment:2
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs