Proposal: allow opening files from the current project globally #6483
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is for discussion/a proposal.
We have a situation right now where you can use
-open
inbsc-flags
to open modules globally. This is quite useful in many cases. However, you're only able to open modules from external dependencies, not modules from your current project, as that would create a circular dependency as it'd also be opened in itself. This PR changes that so that the globally opened module won't be opened in itself.I'm not sure if this is something we want to allow, nor what the consequences would be. But, it would be useful in many scenarios given that you could put together your own globally available little "stdlib". The usefulness might be a bit negated by the fact that it'd be quite restricted - you couldn't reference other files in your project as those would get the open injected, and by that create a circular dep. It might also cause excessive compilation times when you change your globally opened file, as all project files will now depend on that.
So, unclear if the upsides beat the downsides.
Comments and discussion welcome!