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

Warning about missing quotes in entity paths can be annoying #3995

Closed
Wumpf opened this issue Oct 25, 2023 · 2 comments · Fixed by #4476
Closed

Warning about missing quotes in entity paths can be annoying #3995

Wumpf opened this issue Oct 25, 2023 · 2 comments · Fixed by #4476
Assignees
Labels
😤 annoying Something in the UI / SDK is annoying to use
Milestone

Comments

@Wumpf
Copy link
Member

Wumpf commented Oct 25, 2023

WARN re_log_types::path::parse_path] Found an entity path 'world/100_7100.JPG' that was not in the normalized form. Please write it as 'world/"100_7100.JPG"' instead.

@Wumpf Wumpf added 😤 annoying Something in the UI / SDK is annoying to use 🏎️ Quick Issue Can be fixed in a few hours or less labels Oct 25, 2023
@emilk
Copy link
Member

emilk commented Oct 25, 2023

Yeah, this was maybe a bit aggressive on my part. Perhaps we should rethink the "name" vs "Index::String" dichotomy. It is at the moment just adding complexity and confusion.

@emilk
Copy link
Member

emilk commented Nov 1, 2023

We should also consider adding helpers for constructing entity-paths int our public API:s, especially for C++.
See for instance https://github.com/rerun-io/cpp-example-vrs/pull/1/files/4cafa610dcd9c5b1653b7e474d5b954fa9bd9536#r1377867266

@emilk emilk added this to the Triage milestone Nov 1, 2023
@emilk emilk removed the 🏎️ Quick Issue Can be fixed in a few hours or less label Nov 22, 2023
@emilk emilk self-assigned this Dec 11, 2023
@emilk emilk mentioned this issue Dec 12, 2023
4 tasks
emilk added a commit that referenced this issue Dec 13, 2023
### What
This is a breaking change, though in _most_ cases it is a cosmetic one.

This PR makes entity paths work a lot more similar to file paths.
There is no need for `"` quotes around path parts, instead we now use
`\` to escape special characters.

You need to escape any character that isn't alphabetical, numeric, `.`,
`-`, or `_`.

Before: `world/"My Image.jpg"/detection`
After: `world/My\ Image.jpg/detection`

The entity path parser is very liberal in what it accepts (in fact, it
never errors), but it will log a warning if the entity path doesn't
follow the normalized form.

NOTE: unicode characters do NOT need escaping, so `värld/bil` is a valid
entity path.
We also support unicode escapes like `\u{211D}`.

More details here: #4464

* Closes #3697
* Closes #3995
* Closes #4338
* Closes #4464

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested the web demo (if applicable):
  * Full build: [app.rerun.io](https://app.rerun.io/pr/4476/index.html)
* Partial build:
[app.rerun.io](https://app.rerun.io/pr/4476/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
- Useful for quick testing when changes do not affect examples in any
way
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG

- [PR Build Summary](https://build.rerun.io/pr/4476)
- [Docs
preview](https://rerun.io/preview/2c7017ea73627cfec74d4aedb0aaa680344624d8/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/2c7017ea73627cfec74d4aedb0aaa680344624d8/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)

---------

Co-authored-by: Jeremy Leibs <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
😤 annoying Something in the UI / SDK is annoying to use
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants