Skip to content

x86 asm: handle unit names with special characters#9465

Merged
nojb merged 1 commit intoocaml:trunkfrom
nojb:fix_dash_unit_name
Apr 19, 2020
Merged

x86 asm: handle unit names with special characters#9465
nojb merged 1 commit intoocaml:trunkfrom
nojb:fix_dash_unit_name

Conversation

@nojb
Copy link
Copy Markdown
Contributor

@nojb nojb commented Apr 18, 2020

Fixes #9461

@nojb nojb force-pushed the fix_dash_unit_name branch from 64bd6c3 to 7b3affe Compare April 18, 2020 11:41
@gasche
Copy link
Copy Markdown
Member

gasche commented Apr 18, 2020

I looked at other direct uses of make_symbol in emit.mlp files, and saw no instance of a similar bug. (It would be nice to have a dedicated type for symbols different than string, and in particular it would rule this error out).

@nojb
Copy link
Copy Markdown
Contributor Author

nojb commented Apr 18, 2020

Anyone willing to formally approve ?

@gasche
Copy link
Copy Markdown
Member

gasche commented Apr 18, 2020

Done.

@nojb
Copy link
Copy Markdown
Contributor Author

nojb commented Apr 18, 2020

Thanks! Will merge once CI passes.

@nojb
Copy link
Copy Markdown
Contributor Author

nojb commented Apr 18, 2020

OK, there is an issue with the ^ in the filename (actually two) under Windows:

  1. ocamltest needed to handle this when calling diff to compare the outputs. I pushed a commit with a fix.
  2. flexdll needs to be adapted to handle this special character.

Since synchronizing with flexdll will be difficult, I suggest we remove the caret from the file name.

@gasche
Copy link
Copy Markdown
Member

gasche commented Apr 19, 2020

@nojb I think that the use of Filename.quote_command is a pretty nice fix. Shouldn't we also use it in other places where Sys.command is used in the distribution? Now that you are drawing attention to it, I am a bit worried about, for example, in ocamltest/main.ml:

Sys.command ("rm -rf " ^ test_build_directory_prefix)

This could turn into a disaster if there is a quoting problem in the argument.

Other uses have the general foo > bar form you fixed, including one in the toplevel.

I think it could be nice to try to adapt all relevant uses of Sys.command, possibly in a separate PR.

@nojb nojb force-pushed the fix_dash_unit_name branch from b7d9d3f to 88dae40 Compare April 19, 2020 07:09
@nojb
Copy link
Copy Markdown
Contributor Author

nojb commented Apr 19, 2020

I think it could be nice to try to adapt all relevant uses of Sys.command, possibly in a separate PR.

Indeed, I will prepare a separate PR for that. I removed the ocamltest fix from this PR, as it is not needed as I removed the caret from the file name. I will include it in the coming PR.

Am (still) planning to merge this as soon as CI passes :)

@gasche
Copy link
Copy Markdown
Member

gasche commented Apr 19, 2020

Very good, thanks!

@nojb nojb merged commit ec6690f into ocaml:trunk Apr 19, 2020
@nojb nojb deleted the fix_dash_unit_name branch April 19, 2020 09:17
@nojb
Copy link
Copy Markdown
Contributor Author

nojb commented Apr 19, 2020

The test breaks under openbsd/freebsd in INRIA's CI; fix in #9473

@stedolan
Copy link
Copy Markdown
Contributor

(It would be nice to have a dedicated type for symbols different than string, and in particular it would rule this error out).

To this end, have a look at @mshinwell's RFC.

stedolan added a commit to janestreet/ocaml that referenced this pull request Apr 22, 2020
x86 asm: handle unit names with special characters (ocaml#9465)
stedolan added a commit to janestreet/ocaml that referenced this pull request Apr 28, 2020
x86 asm: handle unit names with special characters (ocaml#9465)
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Jul 16, 2020
x86 asm: handle unit names with special characters (ocaml#9465)
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Jul 20, 2020
x86 asm: handle unit names with special characters (ocaml#9465)
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Jul 20, 2020
x86 asm: handle unit names with special characters (ocaml#9465)
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Jul 21, 2020
x86 asm: handle unit names with special characters (ocaml#9465)
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Jul 21, 2020
x86 asm: handle unit names with special characters (ocaml#9465)
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Jul 30, 2020
x86 asm: handle unit names with special characters (ocaml#9465)
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Jul 30, 2020
x86 asm: handle unit names with special characters (ocaml#9465)
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Aug 3, 2020
x86 asm: handle unit names with special characters (ocaml#9465)
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Aug 4, 2020
x86 asm: handle unit names with special characters (ocaml#9465)
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Aug 5, 2020
x86 asm: handle unit names with special characters (ocaml#9465)
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Aug 7, 2020
x86 asm: handle unit names with special characters (ocaml#9465)
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Aug 10, 2020
x86 asm: handle unit names with special characters (ocaml#9465)
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Aug 10, 2020
x86 asm: handle unit names with special characters (ocaml#9465)
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Aug 17, 2020
x86 asm: handle unit names with special characters (ocaml#9465)
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Aug 18, 2020
x86 asm: handle unit names with special characters (ocaml#9465)
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Aug 19, 2020
x86 asm: handle unit names with special characters (ocaml#9465)
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Aug 20, 2020
x86 asm: handle unit names with special characters (ocaml#9465)
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Aug 28, 2020
x86 asm: handle unit names with special characters (ocaml#9465)
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Sep 2, 2020
x86 asm: handle unit names with special characters (ocaml#9465)
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Sep 2, 2020
x86 asm: handle unit names with special characters (ocaml#9465)
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Sep 2, 2020
x86 asm: handle unit names with special characters (ocaml#9465)
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Sep 7, 2020
x86 asm: handle unit names with special characters (ocaml#9465)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't compile a filename containing "-" character in OCaml 4.11 on AMD64

3 participants