scons misinterprets .hi path from haskell add-on

Bug #633861 reported by Ben Samuel on 2010-09-09
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SCons Haskell Tool

Bug Description

~/tmp/hask $ scons --taskmastertrace=tracefile --debug=explain --debug=includes --tree=all
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: building `Test/Modfile.o' because it doesn't exist
scons: *** [Test/Modfile.o] Implicit dependency `Test/Test/Importedfile.hi' not found, needed by target `Test/Modfile.o'.
    | +-Test/Importedfile.o
    | +-Test/Importedfile.hs
    | +-/usr/local/bin/ghc
    | +-Test/Importedfile.hs
    | +-/usr/local/bin/ghc
    | +-Test/Modfile.o
    | +-Test/Modfile.hs
    | +-Test/Test/Importedfile.hi
    | +-/usr/local/bin/ghc
    | +-Test/Modfile.hs
    | +-Test/Test/Importedfile.hi
    | +-/usr/local/bin/ghc

The add-on doesn't seem to be generating 'Test/Test/Importedfile.hi', so the problem seems to be in SCons.
Still working on stepping through SCons to figure out where it's misinterpreting the data from the add-on, will add comments if I track it down.

Running OS X 10.6.1; doesn't seem to be an OS specific problem.
Build and install version 2.0.1 of SCons.

The attached zip includes:
   project files
   sconstruct script
   site_scons directory with haskell add-on
   taskmaster tracefile
   scons output (same as above)

Ben Samuel (ben-samuel) wrote :
Russel Winder (russel) wrote :

Move from SConsAddOns project to SCons Haskell Tool project

affects: sconsaddons → scons-haskell
Ben Samuel (ben-samuel) wrote :

Not sure if this is The Right Thing To Do, but it fixes it for me. The issue occurs at code in `Script/Node/` in the decision block `if initial_hash or absolute:` (at or about line 1169) when it is trying to determine what the path is relative to.

My patch is simply:

=== modified file ''
--- 2010-07-08 14:23:28 +0000
+++ 2010-09-12 12:10:32 +0000
@@ -76,7 +76,7 @@
         modules = map(lambda (qualified, module) : module, imports)
         interfaces = []
         for module in modules:
- module = module.replace(".", "/")
+ module = "#" + module.replace(".", "/")
                 interface = module + ".hi"
                 hs_file = module + ".hs"
                 lhs_file = module + ".lhs"

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments