Paul Dietrich created MYNEWT-227:
------------------------------------

             Summary: newt target import is sensitive to space after @endtargets
                 Key: MYNEWT-227
                 URL: https://issues.apache.org/jira/browse/MYNEWT-227
             Project: Mynewt
          Issue Type: Improvement
            Reporter: Paul Dietrich


If I paste this

newt target import arduino_zero_blinky 
@target=arduino_zero_blinky 
vers=0.0.1 
arch=cortex_m0 
compiler_def=debug 
name=arduino_zero_blinky 
bsp=hw/bsp/arduino_zero 
compiler=arm-none-eabi-m0 
project=blinky 
@endtargets 

it will not import correctly (space after @endtargets) but if I remove the 
space it all imports correct.

here is the stack trace

Pauls-MacBook-Pro-2:bsp paulfdietrich$ newt target import arduino_zero_blinky 
@target=arduino_zero_blinky 
vers=0.0.1 
arch=cortex_m0 
compiler_def=debug 
name=arduino_zero_blinky 
bsp=hw/bsp/arduino_zero 
compiler=arm-none-eabi-m0 
project=blinky 
@endtargets 
panic: runtime error: index out of range

goroutine 1 [running]:
mynewt.apache.org/newt/newt/cli.ImportTargets(0xc82009b980, 0x7fff5fbffc56, 
0x13, 0x0, 0xc820096000, 0x0, 0x0)
        
/Users/paulfdietrich/Development/Go/src/mynewt.apache.org/newt/newt/cli/target.go:223
 +0x8ec
main.targetImportCmd(0xc8201b8200, 0xc82022f2c0, 0x1, 0x1)
        
/Users/paulfdietrich/Development/Go/src/mynewt.apache.org/newt/newt/newt.go:440 
+0x70
github.com/spf13/cobra.(*Command).execute(0xc8201b8200, 0xc82022f210, 0x1, 0x1, 
0x0, 0x0)
        
/Users/paulfdietrich/Development/Go/src/github.com/spf13/cobra/command.go:569 
+0x869
github.com/spf13/cobra.(*Command).ExecuteC(0xc82011c000, 0xc8201b8200, 0x0, 0x0)
        
/Users/paulfdietrich/Development/Go/src/github.com/spf13/cobra/command.go:656 
+0x56b
github.com/spf13/cobra.(*Command).Execute(0xc82011c000, 0x0, 0x0)
        
/Users/paulfdietrich/Development/Go/src/github.com/spf13/cobra/command.go:615 
+0x2d
main.main()
        
/Users/paulfdietrich/Development/Go/src/mynewt.apache.org/newt/newt/newt.go:1503
 +0x25

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1721 +0x1

goroutine 20 [syscall]:
os/signal.loop()
        /usr/local/go/src/os/signal/signal_unix.go:22 +0x18
created by os/signal.init.1
        /usr/local/go/src/os/signal/signal_unix.go:28 +0x37

goroutine 21 [chan receive]:
database/sql.(*DB).connectionOpener(0xc820390280)
        /usr/local/go/src/database/sql/sql.go:634 +0x45
created by database/sql.Open
        /usr/local/go/src/database/sql/sql.go:481 +0x336
exit status 2
Pauls-MacBook-Pro-2:bsp paulfdietrich$ 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to