[GHC] #13940: Reduce duplicate implementations of argument handling on Windows
#13940: Reduce duplicate implementations of argument handling on Windows ----------------------------------------+--------------------------------- Reporter: AndreasK | Owner: (none) Type: task | Status: new Priority: low | Milestone: Component: Runtime System | Version: Keywords: unicode windows | Operating System: Windows Architecture: Unknown/Multiple | Type of failure: None/Unknown Test Case: | Blocked By: Blocking: | Related Tickets: #12870 Differential Rev(s): | Wiki Page: ----------------------------------------+--------------------------------- On windows we currently ignore arguments to hs_init/main's argv and instead get the arguments from the windows api when they are requested from the Haskell side. This means * Passing custom arguments to hs_init when not using hs_main might behave unexpected (The haskell und RTS side see different arguments). * Duplication of code to simulate filtering of Arguments by the RTS on the Haskell side. * Behavior between Linux and Windows might differ as result of the above (eg #13287) Instead we can get the UTF16 encoded arguments inside of hs_main from the windows API and pass them along to the RTS UTF8-encoded. This allows argument handling to be fairly uniform between Linux and Windows and enables us to accept hs_init arguments on Windows. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13940> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13940: Reduce duplicate implementations of argument handling on Windows -------------------------------------+------------------------------------- Reporter: AndreasK | Owner: AndreasK Type: task | Status: new Priority: low | Milestone: Component: Runtime System | Version: Resolution: | Keywords: unicode | windows Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #12870 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by AndreasK): * owner: (none) => AndreasK -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13940#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13940: Reduce duplicate implementations of argument handling on Windows -------------------------------------+------------------------------------- Reporter: AndreasK | Owner: AndreasK Type: task | Status: new Priority: low | Milestone: Component: Runtime System | Version: Resolution: | Keywords: unicode | windows Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #12870 | Differential Rev(s): Phab:D3739 Wiki Page: | -------------------------------------+------------------------------------- Changes (by AndreasK): * differential: => Phab:D3739 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13940#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13940: Reduce duplicate implementations of argument handling on Windows -------------------------------------+------------------------------------- Reporter: AndreasK | Owner: AndreasK Type: task | Status: new Priority: low | Milestone: Component: Runtime System | Version: Resolution: | Keywords: unicode | windows Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #12870 | Differential Rev(s): Phab:D3739 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Tamar Christina <tamar@…>): In [changeset:"7af0b906116e13fbd90f43f2f6c6b826df2dca77/ghc" 7af0b906/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="7af0b906116e13fbd90f43f2f6c6b826df2dca77" Initialize hs_init with UTF8 encoded arguments on Windows. Summary: Get utf8 encoded arguments before we call hs_init and use them instead of ignoring hs_init arguments. This reduces differing behaviour of the RTS between windows and linux and simplifies the code involved. A few testcases were changed to expect the same result on windows as on linux after the changes. This fixes #13940. Test Plan: ./validate Reviewers: austin, hvr, bgamari, erikd, simonmar, Phyx Subscribers: Phyx, rwbarton, thomie GHC Trac Issues: #13940 Differential Revision: https://phabricator.haskell.org/D3739 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13940#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13940: Reduce duplicate implementations of argument handling on Windows -------------------------------------+------------------------------------- Reporter: AndreasK | Owner: AndreasK Type: task | Status: closed Priority: low | Milestone: Component: Runtime System | Version: Resolution: fixed | Keywords: unicode | windows Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #12870 | Differential Rev(s): Phab:D3739 Wiki Page: | -------------------------------------+------------------------------------- Changes (by Phyx-): * status: new => closed * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13940#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC