Issue 5445 in pharo: Broken command-line arguments in 1.4

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Issue 5445 in pharo: Broken command-line arguments in 1.4

pharo
Status: Accepted
Owner: [hidden email]
CC: [hidden email]
Labels: Type-Bug Milestone-1.4

New issue 5445 by [hidden email]: Broken command-line arguments in 1.4
http://code.google.com/p/pharo/issues/detail?id=5445

before a following was working:

VM -headless image.image script.st

now for strange reason, a CommandLine thinks that image.image
is a script and tries to open it and run...

this happens on windows slave.
the problem is that if i put -headless at the end,
VM won't run headless. It should be first argument.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5445 in pharo: Broken command-line arguments in 1.4

pharo
Updates:
        Cc: [hidden email]

Comment #1 on issue 5445 by [hidden email]: Broken command-line  
arguments in 1.4
http://code.google.com/p/pharo/issues/detail?id=5445

headless does not work at all anyway (at least when I try it in the Cocoa  
VM)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5445 in pharo: Broken command-line arguments in 1.4

pharo

Comment #2 on issue 5445 by [hidden email]: Broken command-line  
arguments in 1.4
http://code.google.com/p/pharo/issues/detail?id=5445

CommandLine used to start fetching the params from the index nbr 2:

        args := OrderedCollection new.
        str := Smalltalk getSystemAttribute: (index := 2).
                [ str isNil or: [ str isEmpty ] ] whileFalse:
    [ args add: str.
                str := Smalltalk getSystemAttribute: (index := index + 1) ].
  ^ args.

And now it uses SmalltalkImage>>arguments, implemented like

        ^Array streamContents: [ :str || arg i |
                i := 1.
                [i > 998 or: [(arg := self argumentAt: i) == nil]]
                        whileFalse:
                                [str nextPut: arg.
                                i := i + 1]].

What about make CodeLoader evade the options?


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5445 in pharo: Broken command-line arguments in 1.4

pharo

Comment #3 on issue 5445 by [hidden email]: Broken command-line  
arguments in 1.4
http://code.google.com/p/pharo/issues/detail?id=5445

CogVM -headless Pharo-1.4.image test.st asd

Works for me in the unix vm...


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5445 in pharo: Broken command-line arguments in 1.4

pharo

Comment #4 on issue 5445 by [hidden email]: Broken command-line  
arguments in 1.4
http://code.google.com/p/pharo/issues/detail?id=5445

More on, if I test that with the following script:

| file |
file := StandardFileStream fileNamed: 'test.txt'.
file nextPutAll: CommandLine commandLineInput asString.
file close.
Smalltalk snapshot: false andQuit: true.

I have the following output:

an OrderedCollection('test.st' 'asd')

And "Smalltalk documentPath" expression resolves to nil in my Unix VM :)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5445 in pharo: Broken command-line arguments in 1.4

pharo

Comment #5 on issue 5445 by [hidden email]: Broken command-line  
arguments in 1.4
http://code.google.com/p/pharo/issues/detail?id=5445

I mean, It works in my unix vm because

Smalltalk documentPath  is nil




_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5445 in pharo: Broken command-line arguments in 1.4

pharo
Updates:
        Status: FixReviewNeeded

Comment #6 on issue 5445 by [hidden email]: Broken command-line  
arguments in 1.4
http://code.google.com/p/pharo/issues/detail?id=5445

in SLICE-Issue-5445-Broken-command-line-arguments-in-14-EstebanLorenzano.1

you need to add to post load preamble:

CommandLine resetRegistrations.
BasicCodeLoader initialize.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5445 in pharo: Broken command-line arguments in 1.4

pharo

Comment #7 on issue 5445 by [hidden email]: Broken command-line  
arguments in 1.4
http://code.google.com/p/pharo/issues/detail?id=5445

Issue 4057 has been merged into this issue.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5445 in pharo: Broken command-line arguments in 1.4

pharo
Updates:
        Status: FixToInclude

Comment #8 on issue 5445 by [hidden email]: Broken command-line  
arguments in 1.4
http://code.google.com/p/pharo/issues/detail?id=5445

I have tested both headless & headful operation. It seems to work ok.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5445 in pharo: Broken command-line arguments in 1.4

pharo
Updates:
        Status: Integrated

Comment #9 on issue 5445 by [hidden email]: Broken command-line  
arguments in 1.4
http://code.google.com/p/pharo/issues/detail?id=5445

in 14424


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5445 in pharo: Broken command-line arguments in 1.4

pharo
Updates:
        Status: FixReviewNeeded

Comment #10 on issue 5445 by [hidden email]: Broken command-line  
arguments in 1.4
http://code.google.com/p/pharo/issues/detail?id=5445

I reopen this issue because it broke Pharo Kernel shrinking. Fix included  
(it only changes CodeLoader to BasicCodeLoader in deregistration)

Attachments:
        SmalltalkImage-privShrinkingProcess.st  2.5 KB


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5445 in pharo: Broken command-line arguments in 1.4

pharo
Updates:
        Status: FixToInclude

Comment #11 on issue 5445 by [hidden email]: Broken command-line  
arguments in 1.4
http://code.google.com/p/pharo/issues/detail?id=5445

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5445 in pharo: Broken command-line arguments in 1.4

pharo
Updates:
        Status: Integrated

Comment #12 on issue 5445 by [hidden email]: Broken command-line  
arguments in 1.4
http://code.google.com/p/pharo/issues/detail?id=5445

in 14425


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5445 in pharo: Broken command-line arguments in 1.4

pharo
Updates:
        Status: Workneeded

Comment #13 on issue 5445 by [hidden email]: Broken command-line  
arguments in 1.4
http://code.google.com/p/pharo/issues/detail?id=5445

It seems that the original problem is not fixed yet.

 From the original report:

|VM -headless image.image script.st
|
|now for strange reason, a CommandLine thinks that image.image
|is a script and tries to open it and run...


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5445 in pharo: Broken command-line arguments in 1.4

pharo

Comment #14 on issue 5445 by [hidden email]: Broken command-line  
arguments in 1.4
http://code.google.com/p/pharo/issues/detail?id=5445

We should keep in mind that the only thing we try to accomplish with this  
tracker entry is to
run the tests on Windows...


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5445 in pharo: Broken command-line arguments in 1.4

pharo

Comment #15 on issue 5445 by [hidden email]: Broken command-line  
arguments in 1.4
http://code.google.com/p/pharo/issues/detail?id=5445

We should postpone all windows stuff to 2.0


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5445 in pharo: Broken command-line arguments in 1.4

pharo
Updates:
        Labels: -Milestone-1.4 Milestone-2.0

Comment #16 on issue 5445 by [hidden email]: Broken command-line  
arguments in 1.4
http://code.google.com/p/pharo/issues/detail?id=5445

We decided to postpone this to  2.0


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5445 in pharo: Broken command-line arguments in 1.4

pharo

Comment #17 on issue 5445 by [hidden email]: Broken command-line  
arguments in 1.4
http://code.google.com/p/pharo/issues/detail?id=5445

The whole AbstractUserInput, CommandLine, {,Basic,Simple}CodeLoader need to  
be cleaned up and simplified


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5445 in pharo: Broken command-line arguments in 1.4

pharo
In reply to this post by pharo
Updates:
        Status: FixToInclude

Comment #19 on issue 5445 by [hidden email]: Broken command-line  
arguments in 1.4
http://code.google.com/p/pharo/issues/detail?id=5445

I patched the windows path resolving to "normalize" path strings before  
create a path.
That means, replace all $/ with $\, so the path is well parsed.

in SLICE-Issue-5445-Broken-command-line-arguments-in-14-EstebanLorenzano.3


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5445 in pharo: Broken command-line arguments in 1.4

pharo
Updates:
        Labels: -Milestone-2.0

Comment #20 on issue 5445 by [hidden email]: Broken command-line  
arguments in 1.4
http://code.google.com/p/pharo/issues/detail?id=5445

in 2.0 049

TODO: 1.4


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
12