SOLVED: Saving tox with different file extensions does not work

Prior to TD version 2022, it was perfectly possible to save and load tox files with any custom file extension. This was very practical for saving subcomponents that are only to be loaded in certain projects and keep them organized by their intended usage simply trough filtering the file names.

But since version 2022 and up, trying to reload a component from an external tox throws a warning triangle and reinitnet/reload refuses to work. Also when saving a component while explicitly providing a custom extension in the filename (even with ui.chooseFile() limiting the extension options), it still appends .tox to the saved file.

Is this a bug or intentional? And if intentional: is there a possible workaround to get old projects that depend on this working in newer versions of TD?

I think it’s intentional as in, it is caused because a bug was patched.

Looking into this further with dev team…

Best,
Michel

2 Likes

Hey @incognite

Just confirming that this is intentional and will not be reverted.

Use a suffix perhaps, with something like .mycustomext.tox

Best,
Michel

Ok. Any idea as to what the logic behind that choice was? Afaik an extension should not matter when it comes to opening files, if the expected format of the file is known. And I don’t expect the TD engine will open just any file that is renamed to .tox and check some file header first?

1 Like