Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty string should be considered a legal import ID #161

Open
zslayton opened this issue Nov 3, 2020 · 2 comments
Open

Empty string should be considered a legal import ID #161

zslayton opened this issue Nov 3, 2020 · 2 comments

Comments

@zslayton
Copy link

zslayton commented Nov 3, 2020

Interesting corner case here: given the intentionally open-ended language in the spec, I think it's possible for the empty string to be a valid import id. parentImportId can be set to "" on line 138; if that happens, attempting to import a child with id="" would cause an error.

To understand this better we'd need to look at all the invocation sites of this class's constructor to see where/why schemaId is set to null.

Originally posted by @zslayton in #157 (comment)

@popematt
Copy link
Contributor

Do you think this is an issue in the implementation, or a mistake in the spec? With the existing AuthorityFilesystem, you can't actually load any schema with an id of "", so it seems unlikely that the spec is intentionally allowing an empty string as a schema id.

@zslayton
Copy link
Author

Without diving into it too deeply, I'd guess it's an issue in the implementation. Ion and its related tools don't usually forbid the empty string as a value. For example: symbol table names can be the empty string and struct field names can be the empty string.

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

No branches or pull requests

2 participants