Skip to content

🎨 Improve edge cases in path handling#139

Merged
elbeno merged 1 commit into
intel:mainfrom
elbeno:expose-make-path
Feb 3, 2026
Merged

🎨 Improve edge cases in path handling#139
elbeno merged 1 commit into
intel:mainfrom
elbeno:expose-make-path

Conversation

@elbeno

@elbeno elbeno commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

Problem:

  • Aside from literals, there isn't an easy way to make a path from a ct_string.
  • root and without_root don't handle edge cases of paths being singleton/empty.
  • There is no function to get the "parent" of a path.

Solution:

  • Expose make_path.
  • Handle edge cases in root and without_root functions.
  • Add parent.

Note:

  • root and without_root are primarily used in path resolution, and manipulate the topmost element.
  • parent is analogous to "go up a directory" and is useful for e.g. getting a register, given a field.

Problem:
- Aside from literals, there isn't an easy way to make a path from a ct_string.
- `root` and `without_root` don't handle edge cases of paths being
  singleton/empty.
- There is no function to get the "parent" of a path.

Solution:
- Expose `make_path`.
- Handle edge cases in `root` and `without_root` functions.
- Add `parent`.

Note:
- `root` and `without_root` are primarily used in path resolution, and
  manipulate the topmost element.
- `parent` is analogous to "go up a directory" and is useful for e.g. getting a
  register, given a field.
@elbeno
elbeno merged commit ee0723e into intel:main Feb 3, 2026
31 checks passed
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

Successfully merging this pull request may close these issues.

2 participants