Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Adding structs with empty values fails #3831

Closed
lak opened this issue Feb 2, 2019 · 3 comments
Closed

Adding structs with empty values fails #3831

lak opened this issue Feb 2, 2019 · 3 comments

Comments

@lak
Copy link

lak commented Feb 2, 2019

Hard to discover when dealing with large datasets, but easy to reproduce:

noms struct new --name Song /tmp/testdb attribute ""
@lak
Copy link
Author

lak commented Feb 2, 2019

Here's the stacktrace:

        Error Trace:    try.go:99
	            	try.go:51
	            	noms_set.go:106
	            	noms_struct.go:112
	            	noms_struct.go:52
	            	noms_struct.go:38
	            	noms.go:100
	            	proc.go:201
	            	asm_amd64.s:1333
	Error:      	Expected true


goroutine 1 [running]:
github.com/attic-labs/noms/go/d.PanicIfTrue(0xc000200a01)
	/Users/luke/src/github.com/attic-labs/noms/go/d/try.go:51 +0xaa
main.argumentToValue(0x7ffeefbffa1a, 0x0, 0x1b25c40, 0xc000200ba0, 0x0, 0x0, 0x0, 0x0)
	/Users/luke/src/github.com/attic-labs/noms/cmd/noms/noms_set.go:106 +0x46
main.applyStructEdits(0x183e6f0, 0x3, 0x7ffeefbffa04, 0xb, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/luke/src/github.com/attic-labs/noms/cmd/noms/noms_struct.go:112 +0x1d4
main.nomsStructNew(0x7ffeefbffa04, 0xb, 0x7ffeefbff9ff, 0x4, 0xc000200a40, 0x2, 0x2, 0x6)
	/Users/luke/src/github.com/attic-labs/noms/cmd/noms/noms_struct.go:52 +0x203
main.nomsStruct.func1(0xc00009fa80, 0xa, 0xc00009fa80)
	/Users/luke/src/github.com/attic-labs/noms/cmd/noms/noms_struct.go:38 +0x296
main.main()
	/Users/luke/src/github.com/attic-labs/noms/cmd/noms/noms.go:100 +0xd78

@lak
Copy link
Author

lak commented Feb 2, 2019

Note that I could see this not being considered a bug, but at least in that case the error message should be improved. IMO, though, empty strings should be allowed.

@aboodman
Copy link
Contributor

aboodman commented Feb 2, 2019 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants