Opened 3 years ago

Closed 3 months ago

#7191 closed bug (worksforme)

hsc2hs can't treat absolute path correctly on Windows.

Reported by: shelarcy Owned by:
Priority: normal Milestone:
Component: hsc2hs Version: 7.8.1-rc2
Keywords: Cc: shelarcy@…, hvr
Operating System: Windows Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

hsc2hs works correcly when using relative path on Windows. But hsc2hs doesn't works when using absolute path on Windows.

C:\home>hsc2hs AbsolutePath.hsc

C:\home>hsc2hs C:\home\AbsolutePath.hs
hsc2hs: .\C:\home\AbsolutePath_hsc_make.exe: runProcess: does not exist (No such
 file or directory)

AbsolutePath.hsc

module Main (main) where

main :: IO ()
main = print #size int

AbsolutePath_out.hs

According to below two tweets (in Japanese), this behavior causes problem when using EclipseFP on Windows.

Attachments (2)

Change History (17)

comment:1 Changed 3 years ago by shelarcy

  • Operating System changed from Unknown/Multiple to Windows

comment:2 Changed 3 years ago by shelarcy

  • Cc shelarcy@… added
  • Status changed from new to patch

Use filepath's function instead of Common.hs' function to fix this problem.

comment:3 Changed 3 years ago by shelarcy

Previous patch imports System.FilePath before System.Exit. I made newer patch that imports System.FilePath after System.Exit.

comment:4 Changed 3 years ago by igloo

  • difficulty set to Unknown
  • Milestone set to 7.6.2
  • Owner set to igloo

Thanks for the report and patches. I'll take a look.

comment:5 Changed 3 years ago by igloo

  • Status changed from patch to merge

Applied, thanks.

Please merge to 7.6.

commit 2f1d9d3009d6193cc664d85ec24de20ce0380db4

Author: shelarcy <[email protected]>
Date:   Wed Oct 3 13:33:48 2012 +0900

    Use filepath's function instead of own (fixes #7191)

comment:6 Changed 3 years ago by pcapriotti

  • Resolution set to fixed
  • Status changed from merge to closed

comment:7 Changed 11 months ago by edwinhere

  • Milestone 7.6.2 deleted
  • Owner igloo deleted
  • Resolution fixed deleted
  • Status changed from closed to new
  • Version changed from 7.4.1 to 7.8.1-rc2

We need to reopen this for hsc2hs version 0.67 and GHC version 7.8.3 in the Haskell platform 2014.2.0.0 for Windows.

I am still getting the error.

Last edited 11 months ago by edwinhere (previous) (diff)

comment:8 Changed 8 months ago by gintas

  • Status changed from new to infoneeded

Can someone confirm? I just tried to reproduce the bug on 2014.2.0.0 but did not run into any problems. Absolute paths worked fine both from cmd.exe and from msys2 bash.

comment:9 Changed 8 months ago by thomie

The problem might be that no new version of hsc2hs has been released in over 2 years [1]. The filepath fix from above has come after the last release.

[1] http://hackage.haskell.org/package/hsc2hs

comment:10 follow-ups: Changed 8 months ago by gintas

What needs to be done to get it released?

Also, any idea why I had problems reproducing the bug? Can anyone else reproduce it?

comment:11 in reply to: ↑ 10 Changed 8 months ago by thomie

  • Cc hvr added

Replying to gintas:

What needs to be done to get it released?

We can try asking @hvr?

Also, any idea why I had problems reproducing the bug? Can anyone else reproduce it?

GHC master does include a more recent version of hsc2hs as a submodule, maybe you were using that?

comment:12 follow-up: Changed 8 months ago by gintas

No, I am sure I was using hsc2hs from Haskell Platform 2014.2.0.0. I just retested, it works perfectly fine.

comment:13 in reply to: ↑ 10 Changed 8 months ago by hvr

Replying to gintas:

What needs to be done to get it released?

Well, hsc2hs was never meant to be released independently from GHC to http://hackage.haskell.org/package/hsc2hs (and GHC's hsc2hs hasn't had its version number incremented for ages, because it's only an internal helper of the GHC distribution)

comment:14 Changed 4 months ago by Phyx-

So what's the status of this ticket then? Should it just be closed?
I can't really follow what should happen here :)

comment:15 in reply to: ↑ 12 Changed 3 months ago by thomie

  • Resolution set to worksforme
  • Status changed from infoneeded to closed

Replying to gintas:

No, I am sure I was using hsc2hs from Haskell Platform 2014.2.0.0. I just retested, it works perfectly fine.

edwinhere: please reopen again if you're still having problems.

Note: See TracTickets for help on using tickets.