scons misinterprets .hi path from haskell add-on

Bug #633861 reported by Ben Samuel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SCons Haskell Tool
New
Undecided
Unassigned

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'.
+-.
  +-SConstruct
  +-Test
    +-Test/Importedfile.hi
    | +-Test/Importedfile.o
    | +-Test/Importedfile.hs
    | +-/usr/local/bin/ghc
    +-Test/Importedfile.hs
    +-Test/Importedfile.o
    | +-Test/Importedfile.hs
    | +-/usr/local/bin/ghc
    +-Test/Modfile.hi
    | +-Test/Modfile.o
    | +-Test/Modfile.hs
    | +-Test/Test/Importedfile.hi
    | +-/usr/local/bin/ghc
    +-Test/Modfile.hs
    +-Test/Modfile.o
    | +-Test/Modfile.hs
    | +-Test/Test/Importedfile.hi
    | +-/usr/local/bin/ghc
    +-Test/Test
      +-Test/Test/Importedfile.hi

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)

Revision history for this message
Ben Samuel (ben-samuel) wrote :
Revision history for this message
Russel Winder (russel) wrote :

Move from SConsAddOns project to SCons Haskell Tool project

affects: sconsaddons → scons-haskell
Revision history for this message
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/FS.py` 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 '__init__.py'
--- __init__.py 2010-07-08 14:23:28 +0000
+++ __init__.py 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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.