... xml files do get reloaded when reloading the UI, else how would you make tweaks while coding? Then again, I'm not sure if the same is true when loading files from xml. But the toc is *not* reread when reloading your UI. *Any* toc changes require a full game restart to take effect.
If it's loaded via XML, the file had to previously exist, you couldn't hot swap a file in, but if it was there to begin with you could load it via XML while the game is live.
Turns out I was mistaken, but not quite the way Seerah describes.
In order to keep track of which libraries I was using, I started out by renaming all the library folders in my Libs\ with an underscore (i.e. "Libs\_AceBucket-3.0"). Then as I pulled libraries and their dependencies into my project, I'd add them to the embeds.xml and rename their folders back to their proper names.
But what happened was, "/console reloadui" wouldn't pick up new libraries this way, even though it did work to add .lua files to my TOC and make them visible with reloadui. I assumed it was because the libraries were referenced via xml files and WoW wasn't updating those, but it turns out it was because of the folder renaming.
The client seems to do a full inventory of subfolders in the AddOns path on boot, and adding (or renaming) any such folders won't be visible without restarting. So even though it was actually reloading the embeds.xml just fine, it wasn't seeing the folder with the actual library in it.
On the other hand, it definitely does reload the TOC -- I tested it again just now to be sure. Maybe it only works if the files added to the TOC already existed on client-boot, but I was just able to add a .lua file to my TOC and have it visible after reloadui.
My recollection differs. I was tinkering with using AceBucket in my mod the other day, and when I added AceBucket (and its AceTimer dependency; already had AceEvent) to my embeds.xml file, /reloadui didn't work -- LibStub couldn't instantiate AceBucket. I had to restart to get it loading right. No changes in the TOC (still the embeds.xml and my own files), just a change in embeds.xml, but /reloadui didn't pick it up.
Most Ace3-based mods I see have a TOC that lists something like "embeds.xml", which in turn <Include.../>s various Libs\Ace*\Ace*.xml files, which in turn <Script.../> the corresponding .lua files for each Ace3 library.
Is there a practical reason for that, or is it just custom and convenience?
Personally I'd rather just list all those library .lua files directly in my TOC, with maybe a blank line to separate them from my addon's own files. That way I can /reloadui any updates while I'm developing. When there are .XMLs involved, I have to restart if I change which libraries I'm using/embedding, because the XMLs don't reload along with the UI.