-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conditional compilation from manifest not considered #745
Comments
Replying just to add some context, since I've asked about this a few months ago in the Developer Slack's #brighterscript channel (can't find the messages since it's been over 90 days). From what I remember (and please keep me humble @TwitchBronBron), the gist of it is that My team's facing a problem due to this, since our manifest is dynamically generated before I'm thinking about opening a PR to tweak |
Hey! You explained the issue perfectly. I'm currently working on merging the file API (#408) into the v0.66.0 release, which will allow us to officially support loading the manifest from the files array and actually even get manifest validation. But that might still be a week or so until it merges, and then you'd also be stuck using the 0.66.alphas until they release (not a bad thing, but might be slightly less stable than mainline). I would also definitely be open to seeing a PR that loads the manifest from the files array instead. That's a much better approach. I think you'd have to do this in ProgramBuilder.ts to prioritize loading manifest into the program first, because Program.ts currently loads manifest on-demand the first time it's needed. An alternative approach is to write a bsc plugin in your project that registers an "afterProgramCreate" event and manually modify the program.manifest Map to set it to the manifest values that you want. Yet another option is to utilize the new bsconfig setting called manifest.bsconst (#887), paired with bsconfig inheritance. (I.e. bsconfig.dev.json extends bsconfig.json) |
In .bs files, if I try to use some defined symbol in manifest
bs_const=someFlag=false
And use it in my bs script
it says
Referenced #const does not exist
. Only if the symbol is defined in the bs script it would work fine.The text was updated successfully, but these errors were encountered: