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

File-like entity paths #4476

Merged
merged 13 commits into from
Dec 13, 2023
Merged

File-like entity paths #4476

merged 13 commits into from
Dec 13, 2023

Conversation

emilk
Copy link
Member

@emilk emilk commented Dec 11, 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

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
    • Full build: app.rerun.io
    • Partial build: app.rerun.io - Useful for quick testing when changes do not affect examples in any way
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG

@emilk emilk added the do-not-merge Do not merge this PR label Dec 11, 2023
Base automatically changed from emilk/better-entity-paths to main December 12, 2023 12:54
@emilk emilk removed the do-not-merge Do not merge this PR label Dec 12, 2023
@emilk emilk force-pushed the emilk/better-entity-paths-2 branch from 9001f39 to 7201623 Compare December 12, 2023 14:52
@emilk emilk marked this pull request as ready for review December 12, 2023 16:56
crates/re_log_types/src/path/parse_path.rs Outdated Show resolved Hide resolved
crates/re_log_types/src/path/parse_path.rs Outdated Show resolved Hide resolved
Comment on lines +37 to +38
In other words, the `log` call is akin to creating a folder with `mkdir -p` and then writing files (components) to it.
Existing components of the same name will be overwritten.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still liking this analogy!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

me too :)

emilk and others added 2 commits December 13, 2023 10:53
Co-authored-by: Jeremy Leibs <[email protected]>
Co-authored-by: Jeremy Leibs <[email protected]>
@emilk emilk added include in changelog 🪵 Log & send APIs Affects the user-facing API for all languages labels Dec 13, 2023
@emilk emilk mentioned this pull request Dec 13, 2023
4 tasks
@emilk emilk merged commit 4c9e5d9 into main Dec 13, 2023
39 of 40 checks passed
@emilk emilk deleted the emilk/better-entity-paths-2 branch December 13, 2023 10:43
emilk added a commit that referenced this pull request Dec 13, 2023
### What

The new label "🪵 Log API" means "stuff that affects all the APIs". This
include changes to `re_types` and (relevantly) changes to how entity
paths works (#4476).

I also gave uniform names to the other labels:

* 🌊 C++ API
* 🐍 Python API
* 🦀 Rust API

_some_ of these used "SDK" before, but that felt too over-arching since
SDK implies a full kit, including the `rerun` binary, the web viewer,
etc - but the language specific things is just the API surface.

### 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/4508/index.html)
* Partial build:
[app.rerun.io](https://app.rerun.io/pr/4508/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/4508)
- [Docs
preview](https://rerun.io/preview/a9278cf8ec9bc1353be9910bd2c4394642a64308/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/a9278cf8ec9bc1353be9910bd2c4394642a64308/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include in changelog 🪵 Log & send APIs Affects the user-facing API for all languages
Projects
None yet
2 participants