Skip to content

Conversation

@embray
Copy link
Collaborator

@embray embray commented Dec 18, 2025

Resolves #104 -- sets up a lot of the preliminary work for writing values.

This PR by chance also exposed some new and exciting problems with the build system, so I've tried to clean that up as best I can. I think things are a little cleaned up now compared to just throwing global settings around pell-mell.

The YAML Pointer path is represented as an STC vector of
asdf_yaml_path_component_t which I think is useful.

Considered writing an implementation that doesn't parse the full path at
once, but just iterates over it, but the problem with that is that it
wouldn't necessarily detect from the start if the path is invalid, so we
parse the full path in one pass.

gh-104
This is a *lot* of string duplication O(n^2) roughly, so not great, and
I don't think we need it either.  Could hypothetically add it back in
later but without the needless duplication

gh-104
strange, worked for me locally, I guess it's a matter of what order
includes end up happening in...

gh-104
…for gh-104

test: fix minor leak in tests and accidental key overwrite

gh-104
If a node is successfully inserted into the document at a previous
position libfyaml actually copies it, it seems, so it's necessary at
that point to free the original node

This might cause a few problems later but we'll see...

gh-104
…trict C11 mode is enabled (which was apparently added at some point)

I think I lost a lot of hair over this one...

gh-104
@embray embray force-pushed the issue-104 branch 2 times, most recently from 92f2ce1 to 0a5e2ed Compare December 18, 2025 17:23
but this also still isn't right either; just wanna see what happens...
@embray
Copy link
Collaborator Author

embray commented Dec 18, 2025

Hmm...still doesn't seem to like that...

@embray
Copy link
Collaborator Author

embray commented Dec 18, 2025

📿

@embray
Copy link
Collaborator Author

embray commented Dec 18, 2025

Praise be to Allah, this seems to actually work. I think it's more sensible now too.

@embray embray merged commit 0069f70 into main Dec 18, 2025
12 checks passed
@embray embray deleted the issue-104 branch December 18, 2025 18:32
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.

asdf_set_ functions for built-in scalar types only and basic tree writing

2 participants