[MacPorts] #26701: sbt gives a "[error] Could not parse command: (1, 1): Expected identifier"
#26701: sbt gives a "[error] Could not parse command: (1,1): Expected identifier" ---------------------------------------------+------------------------------ Reporter: alessandro_mecca@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: | Port: sbt @0.7.4 ---------------------------------------------+------------------------------ I installed sbt, downloaded the LiftWeb demo project from here [http://github.com/lift/lift_sbt_prototype/tarball/Lift_20] unpacked and run "sbt update". It returned this message: {{{ [info] Building project Lift SBT Tempalte 0.1 against Scala 2.7.7 [info] using LiftProject with sbt 0.7.4 and Scala 2.7.7 [error] Could not parse command: (1,1): Expected identifier [info] [info] Total time: 0 s, completed Oct 2, 2010 11:10:10 AM [info] [info] Total session time: 1 s, completed Oct 2, 2010 11:10:10 AM [error] Error during build. }}} Then I found that even a simple sbt --help was giving the same problem. Using the jar downloaded from the official sbt page [http://code.google.com/p/simple-build-tool/downloads/detail?name=sbt- launch-0.7.4.jar] it works. -- Ticket URL: <https://trac.macports.org/ticket/26701> MacPorts <http://www.macports.org/> Ports system for Mac OS
#26701: sbt @0.7.4 gives a "[error] Could not parse command: (1,1): Expected identifier" ---------------------------------------------+------------------------------ Reporter: alessandro_mecca@… | Owner: me@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: | Port: sbt ---------------------------------------------+------------------------------ Changes (by jmr@…): * owner: macports-tickets@… => me@… * port: sbt @0.7.4 => sbt Comment: Please remember to cc the maintainer. -- Ticket URL: <https://trac.macports.org/ticket/26701#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#26701: sbt @0.7.4 gives a "[error] Could not parse command: (1,1): Expected identifier" ---------------------------------------------+------------------------------ Reporter: alessandro_mecca@… | Owner: me@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: | Port: sbt ---------------------------------------------+------------------------------ Comment(by toby.matejovsky@…): I had the same problem on OS X 10.6.4 GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0) The 0.7.4 jar file from MacPorts is the exact same one as from the Google Code page (sha1: 2b7cfadf05b3b26285bb2038145479741268d334). The problem is something with the $QUOTED_ARGS in the sbt script. If you remove that part and substitute "$@" (with quotes) for $QUOTED_ARGS (as recommended in the SBT project page), the sbt script works. Patch: {{{ #!diff 20,26d19 < # Capture any arguments < QUOTED_ARGS="" < while [ "$1" != "" ] ; do < QUOTED_ARGS="$QUOTED_ARGS \"$1\"" < shift < done < 33c26 < exec java $JAVA_OPTS -jar "$LAUNCHJAR" $QUOTED_ARGS ---
exec java $JAVA_OPTS -jar "$LAUNCHJAR" "$@" }}}
-- Ticket URL: <https://trac.macports.org/ticket/26701#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#26701: sbt @0.7.4 gives a "[error] Could not parse command: (1,1): Expected identifier" ---------------------------------------------+------------------------------ Reporter: alessandro_mecca@… | Owner: me@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: | Port: sbt ---------------------------------------------+------------------------------ Comment(by lists@…): I will change the launcher script and bump the Portfile revision number. I am not able to re-create the problem you or Alessandro reported. Most of my test systems (8) match your bash version. Are you passing any arguments to the sbt script? Do you have and JAVA_OPTS set when you get the error? Do you have any unusual shell options set in your .bashrc or .bash_profile? Replying to [comment:2 toby.matejovsky@…]:
I had the same problem on OS X 10.6.4 GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)
The 0.7.4 jar file from MacPorts is the exact same one as from the Google Code page (sha1: 2b7cfadf05b3b26285bb2038145479741268d334).
The problem is something with the $QUOTED_ARGS in the sbt script. If you remove that part and substitute "$@" (with quotes) for $QUOTED_ARGS (as recommended in the SBT project page), the sbt script works. Patch:
{{{ #!diff 20,26d19 < # Capture any arguments < QUOTED_ARGS="" < while [ "$1" != "" ] ; do < QUOTED_ARGS="$QUOTED_ARGS \"$1\"" < shift < done < 33c26 < exec java $JAVA_OPTS -jar "$LAUNCHJAR" $QUOTED_ARGS ---
exec java $JAVA_OPTS -jar "$LAUNCHJAR" "$@" }}}
-- Ticket URL: <https://trac.macports.org/ticket/26701#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#26701: sbt @0.7.4 gives a "[error] Could not parse command: (1,1): Expected identifier" ---------------------------------------------+------------------------------ Reporter: alessandro_mecca@… | Owner: me@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: | Port: sbt ---------------------------------------------+------------------------------ Comment(by alessandro_mecca@…): The error for me happens even when giving a "sbt --help" I don't have JAVA_OPTS set. Nothing to mention in the .bashrc/.bach_profile ... -- Ticket URL: <https://trac.macports.org/ticket/26701#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#26701: sbt @0.7.4 gives a "[error] Could not parse command: (1,1): Expected identifier" ---------------------------------------------+------------------------------ Reporter: alessandro_mecca@… | Owner: me@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: | Port: sbt ---------------------------------------------+------------------------------ Comment(by lists@…): I created ticket #26725 with patches. I was not able to re-create the the message you described. Do let me know whether 0.7.4.1 fixes your problems after the patches are applied to MacPorts. -- Ticket URL: <https://trac.macports.org/ticket/26701#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#26701: sbt @0.7.4 gives a "[error] Could not parse command: (1,1): Expected identifier" ---------------------------------------------+------------------------------ Reporter: alessandro_mecca@… | Owner: me@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: | Port: sbt ---------------------------------------------+------------------------------ Comment(by ryandesign@…): sbt has been updated to 0.7.4_1; please let us know if the problem remains after updating to that version. -- Ticket URL: <https://trac.macports.org/ticket/26701#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#26701: sbt @0.7.4 gives a "[error] Could not parse command: (1,1): Expected identifier" ----------------------------------------------+----------------------------- Reporter: alessandro_mecca@… | Owner: me@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Resolution: worksforme | Keywords: Port: sbt | ----------------------------------------------+----------------------------- Changes (by jmr@…): * status: new => closed * resolution: => worksforme Comment: No response; closing. -- Ticket URL: <https://trac.macports.org/ticket/26701#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts