-
Notifications
You must be signed in to change notification settings - Fork 12k
sync: minja #12739
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
sync: minja #12739
Conversation
Removing json.hpp include might be a little premature. :) |
Did you forget to undraft this, or is it not ready yet? |
Sorry on busy holidays 😎, CI finally went green (needed a nudge), now ready for review |
@@ -240,7 +252,7 @@ class Value : public std::enable_shared_from_this<Value> { | |||
auto index = key.get<int>(); | |||
return array_->at(index < 0 ? array_->size() + index : index); | |||
} else if (object_) { | |||
if (!key.is_hashable()) throw std::runtime_error("Unhashable type: " + dump()); | |||
if (!key.is_hashable()) throw std::runtime_error("Unashable type: " + dump()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!key.is_hashable()) throw std::runtime_error("Unashable type: " + dump()); | |
if (!key.is_hashable()) throw std::runtime_error("Unhashable type: " + dump()); |
I guess this was merged here previously, perhaps you'll upstream it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, thanks! Yes I'd rather only do changes in the minja repo and just sync back wholesale here, I'll apply these there shortly.
@@ -249,7 +261,7 @@ class Value : public std::enable_shared_from_this<Value> { | |||
} | |||
void set(const Value& key, const Value& value) { | |||
if (!object_) throw std::runtime_error("Value is not an object: " + dump()); | |||
if (!key.is_hashable()) throw std::runtime_error("Unhashable type: " + dump()); | |||
if (!key.is_hashable()) throw std::runtime_error("Unashable type: " + dump()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!key.is_hashable()) throw std::runtime_error("Unashable type: " + dump()); | |
if (!key.is_hashable()) throw std::runtime_error("Unhashable type: " + dump()); |
Same.
* sync: minja google/minja#57 * fix json include
(Follow up to #12699 which cherrypicked Ling-lite support + added test)
cc/ @yeahdongcn, @CISC