Conversation
ab46514 to
fe1856e
Compare
server/error_code.md
Outdated
|
|
||
| ### OLS30446 | ||
| "XML ID already exists in module" | ||
| You have duplicated XML ID in the same module |
There was a problem hiding this comment.
that's a work-in-progress :) That diagnostic can't stay, as duplicated xml_id IS valid, even if sometimes not wanted.
We are still figuring out what can reliably be diagnosed :)
There was a problem hiding this comment.
while working on this kind of task, adding this kind of diagnostic help us browse the code and get structure of it :)
8891f59 to
8891fb0
Compare
8891fb0 to
8f72a95
Compare
| module.upgrade().unwrap().borrow_mut().as_module_package_mut().xml_ids.insert(xml_id_model_name, vec![Rc::downgrade(&sym)]); | ||
| }); |
There was a problem hiding this comment.
but what happens if that module is reloaded, you do not update the xml id symbol? it will need a new weak symbol, right? so the vector will just keep slowly growing over time?
I do not se that in the code
There was a problem hiding this comment.
No, you're right, we could use a weakset instead of a vec to keep it clean over time
There was a problem hiding this comment.
does the weakset maintain removing the non-valid weak pointers ?
There was a problem hiding this comment.
yes and no. The PtrWeakHashSet will not actively clean itself. But as soon as you iter on it or try to get an invalid weak, it will be removed from the set and not returned
7983ebe to
07cc216
Compare
07cc216 to
f72e8ba
Compare
No description provided.