[GHC] #10408: The behavior of -ignore-dot-ghci and -ghci-script are weird
#10408: The behavior of -ignore-dot-ghci and -ghci-script are weird -------------------------------------+------------------------------------- Reporter: watashi | Owner: watashi Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 7.10.1 Keywords: | Operating System: Linux Architecture: x86 | Type of failure: Incorrect result Test Case: | at runtime Blocking: | Blocked By: Differential Revisions: | Related Tickets: -------------------------------------+------------------------------------- {{{ $ for i in `seq 10`; do echo "print $i" > /tmp/$i.ghci; done $ ghc -e 0 -ghci-script /tmp/1.ghci -ghci-script /tmp/2.ghci 2 1 0 $ ghc -e 0 -ghci-script /tmp/1.ghci -ghci-script /tmp/2.ghci -ignore-dot- ghci 0 }}} `-ghci-script` are executed in reverse order and are ignored when `-ignore-dot-ghci` is specified, while I expected that: * `-ghci-script` are executed in the order they are specified; * `-ignore-dot-ghci` only ignores the default .ghci files but still executes the scripts passed by `-ghci-script`. I would like to change the behavior to the expected ones. But in case there are users relying on the old behavior, then it might be necessary to introduce different flags. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10408> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10408: The behavior of -ignore-dot-ghci and -ghci-script are weird -------------------------------------+------------------------------------- Reporter: watashi | Owner: watashi Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 7.10.1 Resolution: | Keywords: Operating System: Linux | Architecture: x86 Type of failure: Incorrect result | Test Case: at runtime | Blocking: Blocked By: | Differential Revisions: Phab:D887 Related Tickets: | -------------------------------------+------------------------------------- Changes (by watashi): * differential: => Phab:D887 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10408#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10408: The behavior of -ignore-dot-ghci and -ghci-script are weird -------------------------------------+------------------------------------- Reporter: watashi | Owner: watashi Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 7.10.1 Resolution: | Keywords: Operating System: Linux | Architecture: x86 Type of failure: Incorrect result | Test Case: at runtime | Blocking: Blocked By: | Differential Revisions: Phab:D887 Related Tickets: | -------------------------------------+------------------------------------- Comment (by Austin Seipp <austin@…>): In [changeset:"f5188f3acd73a07b648924a58b9882c2d0a3dbcb/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="f5188f3acd73a07b648924a58b9882c2d0a3dbcb" Fix weird behavior of -ignore-dot-ghci and -ghci-scipt * Make `-ghci-script` be executed in the order they are specified; * Make `-ignore-dot-ghci` only ignores the default .ghci files but still execute the scripts passed by `-ghci-script`. Reviewed By: simonmar, austin Differential Revision: https://phabricator.haskell.org/D887 GHC Trac Issues: #10408 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10408#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10408: The behavior of -ignore-dot-ghci and -ghci-script are weird -------------------------------------+------------------------------------- Reporter: watashi | Owner: watashi Type: bug | Status: closed Priority: normal | Milestone: 7.12.1 Component: GHCi | Version: 7.10.1 Resolution: fixed | Keywords: Operating System: Linux | Architecture: x86 Type of failure: Incorrect result | Test Case: at runtime | Blocking: Blocked By: | Differential Revisions: Phab:D887 Related Tickets: | -------------------------------------+------------------------------------- Changes (by thoughtpolice): * status: new => closed * resolution: => fixed * milestone: => 7.12.1 Comment: Merged, thanks! -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10408#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10408: The behavior of -ignore-dot-ghci and -ghci-script are weird -------------------------------------+------------------------------------- Reporter: watashi | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: GHCi | Version: 7.10.1 Resolution: | Keywords: Operating System: Linux | Architecture: x86 Type of failure: Incorrect result | Test Case: at runtime | Blocking: Blocked By: | Differential Revisions: Phab:D887 Related Tickets: | -------------------------------------+------------------------------------- Changes (by thomie): * owner: watashi => * status: closed => new * resolution: fixed => Comment: SPJ [https://mail.haskell.org/pipermail/ghc-devs/2015-May/009005.html reports]: {{{ Strange testsuite failure Is this expected? Just started happening for me =====> T8333(normal) 140 of 185 [0, 0, 0] cd . && $MAKE -s --no-print-directory T8333 </dev/null > T8333.run.stdout 2> T8333.run.stderr Actual stdout output differs from expected: --- ./T8333.stdout 2015-01-27 13:00:30.000000000 +0000 +++ ./T8333.run.stdout 2015-05-13 11:54:03.199711197 +0100 @@ -0,0 +1,4 @@ +*** WARNING: . is writable by someone else, IGNORING! +Suggested fix: execute 'chmod 644 .' +*** WARNING: /home/simonpj is writable by someone else, IGNORING! +Suggested fix: execute 'chmod 644 /home/simonpj' *** unexpected failure for T8333(normal) }}} I think this is related to this ticket. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10408#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10408: The behavior of -ignore-dot-ghci and -ghci-script are weird -------------------------------------+------------------------------------- Reporter: watashi | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.12.1 Component: GHCi | Version: 7.10.1 Resolution: fixed | Keywords: Operating System: Linux | Architecture: x86 Type of failure: Incorrect result | Test Case: at runtime | Blocking: Blocked By: | Differential Revisions: Phab:D887 Related Tickets: | -------------------------------------+------------------------------------- Changes (by ezyang): * status: new => closed * resolution: => fixed Comment: No, it was fixed in {{{ commit 3ef7fcedfa1ad47968ca5fa107d51a6ab7051ed7 Author: Zejun Wu <watashi@watashi.ws> Date: Thu May 14 10:56:51 2015 -0500 Do not check dir perms when .ghci doesn't exist }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10408#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10408: The behavior of -ignore-dot-ghci and -ghci-script are weird -------------------------------------+------------------------------------- Reporter: watashi | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.12.1 Component: GHCi | Version: 7.10.1 Resolution: fixed | Keywords: Operating System: Linux | Architecture: x86 Type of failure: Incorrect result | Test Case: at runtime | Blocking: Blocked By: | Differential Revisions: Phab:D887 Related Tickets: | -------------------------------------+------------------------------------- Comment (by Thomas Miedema <thomasmiedema@…>): In [changeset:"124f3999d78d8ef6b093e4f1bb1dcef87e4283da/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="124f3999d78d8ef6b093e4f1bb1dcef87e4283da" Testsuite: add -ignore-dot-ghci to some tests Since T10408A and T10408B would become the same now, delete T10408A and rename T10408B to T10408. The test without -ignore-dot-ghci (T10408A) didn't add anything (#10408). }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10408#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10408: The behavior of -ignore-dot-ghci and -ghci-script are weird -------------------------------------+------------------------------------- Reporter: watashi | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.12.1 Component: GHCi | Version: 7.10.1 Resolution: fixed | Keywords: Operating System: Linux | Architecture: x86 Type of failure: Incorrect result | Test Case: at runtime | Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D887 -------------------------------------+------------------------------------- Comment (by mboes): Any chance this fix could be backported to the 7.10 branch? It's affecting the safety of distributing GHCi wrappers to users for building custom GHCi based interactive environments. These need to turn off reading the user's ~/.ghci just in case there's funny stuff in there, while still convincing GHCi to read a custom script.ghci during initialization. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10408#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC