gap icon indicating copy to clipboard operation
gap copied to clipboard

Cygwin is inconsistent with file locations

Open ChrisJefferson opened this issue 6 years ago • 12 comments

In cygwin, functions which find the location of libraries and packages return unix-style paths -- in fact almost everything returns Unix style paths.

However, Exec demands windows style paths, so passing these paths to Exec fails.

We have an undocumented function ExternalFilename which (currently incompletely) maps Unix paths to windows paths, but currently only GRAPE uses it.

I am not sure how to cut this knot. I want to figure out which parts of GAP currently accept windows paths, and which bits accept Unix paths (any help or experiences from cygwin users greatly appreciated!).

The smallest fix would be to either make all packages use ExternalFilename, or introduce an option to Exec/Process to make them use a Unix shell (which would be the default on Unix). However there may be a better way.

ChrisJefferson avatar Dec 13 '17 15:12 ChrisJefferson

IIRC, the reason for the Windows style pathnames is that Exec calls the Windows shell command.com. If we are just porting from Unix, a solution that includes a shell and calls this would probably satisfactory.

What I don't know is if anyone under Windows actually wants to call Windows programs with Exec (and thus a version with command should be preserved, say as ExecWindows.

Generically there also is the question in how to deal with Windows style filenames if user calls (say) PrintTo("C:\Documents\Homework\MyFile.txt") (and one can even argue about CRLF if one wants -- not that I do.)

hulpke avatar Dec 14 '17 18:12 hulpke

I'm going to investigate -- actually running windows program with the cygwin shell works fine, unless someone is trying to run a cmd built-in (like dir)

ChrisJefferson avatar Dec 14 '17 20:12 ChrisJefferson

I've assigned this to GAP 4.10.0 milestone to ensure that this will not fall below radar.

olexandr-konovalov avatar Dec 14 '17 20:12 olexandr-konovalov

Unfortunately I think this issue still fell below the radar (likely because nobody actually pays attention to milestones, and we have no clear process and how they should be used resp. watched).

fingolfin avatar Sep 28 '18 14:09 fingolfin

But perhaps @ChrisJefferson actually did make some progress, despite there being no updates here?

fingolfin avatar Sep 28 '18 14:09 fingolfin

Having heard no further updates, I am moving this to GAP 4.11

olexandr-konovalov avatar Nov 01 '18 22:11 olexandr-konovalov

Moving this to GAP 4.12 milestone.

olexandr-konovalov avatar Mar 07 '20 23:03 olexandr-konovalov

This is still on the 4.12.0 milestone, but I am not sure if that makes sense -- @ChrisJefferson care to comment?

fingolfin avatar Feb 23 '21 22:02 fingolfin

This will be fixed with the new cygwin release

ChrisJefferson avatar Feb 24 '21 11:02 ChrisJefferson

When I make the new release I will sweep over all the 'windows' tagged things

ChrisJefferson avatar Feb 24 '21 11:02 ChrisJefferson

@ChrisJefferson ping

fingolfin avatar Dec 29 '21 23:12 fingolfin

This is fixed in the latest windows releases. I do want to make a pass over all packages -- I don't know the best way to test all the packages with the release, and if this would like up well with the next GAPDays, or I should just do manually(ish) just to check they all seem to work.

ChrisJefferson avatar Feb 14 '22 11:02 ChrisJefferson

fixed in the latest way of building releases

ChrisJefferson avatar Aug 16 '22 09:08 ChrisJefferson