addshore
05/28/2025, 1:06 PMfoo.gen.toit
However seemingly can not be imported, due to the .
Next I tried calling them all goo_gen.toit
However this is also annoying as It leads to needing to import foo_gen which also would be nice to avoid.
Would it be possible to make everything after a . in a file actually be determined to be part of the file extension? And then also make toit allow / look for .*.toit and .toit?kasperl
05/28/2025, 1:10 PMimport foo_gen as foo as a workaround?kasperl
05/28/2025, 1:12 PMimport foo look for all files of the form foo.toit or foo.*.toit and report an error if it is ambiguous?kasperl
05/28/2025, 1:13 PMimport foo.gen and just refer to it as foo in the code?kasperl
05/28/2025, 1:13 PM- and _ in them.kasperl
05/28/2025, 1:16 PMaddshore
05/28/2025, 1:16 PMimport ..messages.messages_gen
// Usage of something from that imported place
Position.MT
Your point about ambiguity makes sense thoughaddshore
05/28/2025, 1:17 PMkasperl
05/28/2025, 1:17 PMaddshore
05/28/2025, 1:18 PM.*.toit, perhaps a .gen.toit special case would be nice.
Really it would / could be nice then to have these combined into a single includable resource
foo.toit and foo.gen.toit in combinationaddshore
05/28/2025, 1:18 PM_gen for now 😛kasperl
05/28/2025, 1:20 PM_gen is the best. Have you considered not letting the users import the _gen files directly, but use an export in a non-generated file that then holds the weird import?addshore
05/28/2025, 1:21 PMkasperl
05/28/2025, 1:21 PMkasperl
05/28/2025, 1:21 PMaddshore
05/28/2025, 2:54 PM