Closed georgejecook closed 3 years ago
I've looked into this more; but I can't see rhyme or reason to it - my only guess is perhaps we're missing an error somewhere.. I'll try and investigate some more
Yeah very strange. Can you put together a very small sample project that will reproduce the issue? Then I can dig into this early next week.
@georgejecook can you look over this spec and tell me if that properly represents the code structure you were describing above? I did find one issue where the path separators were wrong on windows for some of the imports, but other than that, the spec passes. Is this still an issue? If so, can you modify the spec below to reproduce your issue?
it('complicated import graph adds correct script tags', async () => {
await program.addOrReplaceFile('source/maestro/ioc/IOCMixin.bs', `
sub DoIocThings()
end sub
`);
await program.addOrReplaceFile('source/BaseClass.bs', `
import "pkg:/source/maestro/ioc/IOCMixin.bs"
`);
await program.addOrReplaceFile('components/AuthManager.bs', `
import "pkg:/source/BaseClass.bs"
`);
await testTranspile(`
<?xml version="1.0" encoding="utf-8" ?>
<component name="ChildScene" extends="ParentScene">
<script type="text/brighterscript" uri="AuthManager.bs" />
</component>
`, `
<?xml version="1.0" encoding="utf-8" ?>
<component name="ChildScene" extends="ParentScene">
<script type="text/brightscript" uri="AuthManager.brs" />
<script type="text/brightscript" uri="pkg:/source/maestro/ioc/IOCMixin.bs" />
<script type="text/brightscript" uri="pkg:/source/BaseClass.brs" />
<script type="text/brightscript" uri="pkg:/source/bslib.brs" />
</component>
`, null, 'components/AuthenticationService.xml');
});
I'm closing this, as it appears to be working on 2 projects these days.
I have this import in several files:
it's a valid import, imported into
BaseClass.bs
, extended byAuthManager.bs
The
AuthenticationService
xml importsAuthManager.bs
I would expect the import to be present in the build
AuthenticationService.xml
's script imports: it is not I add the import to the extendedAuthManager
class; it still doesn't show up. I add it to theAuthenticationService.bs
file, it still doesn't show up as a script tagThe only recourse I have is to add the imports that get dropped as a script tag in the file.