merge-queue: embarking main (791db90) and #293 together#313
Closed
mergify[bot] wants to merge 8 commits intomainfrom
Closed
merge-queue: embarking main (791db90) and #293 together#313mergify[bot] wants to merge 8 commits intomainfrom
mergify[bot] wants to merge 8 commits intomainfrom
Conversation
This is in preparation for having a Prog include imported modules. BREAKING CHANGE: this change requires a database migration, as it changes the representation of `Prog`. However, since this is just serialised to json and stored as a blob in the DB, it requires no schema changes. Since we have no programs we need to preserve, we decided not to bother with a migration. This means that DBs created before this commit will not load with a primer containing this commit.
We will shortly want to import Primer.Core(defID), and want to avoid CI failures due to -Werror -Wname-shadowing.
We enable Primer programs to import modules. This is achieved by adding a `progImports :: [Module]` field to `Prog`. The imported modules are each immutable (via the api). This immutability is ensured by having all the actions only operate on the one "current" module (that comprises the old `progDefs` and `progTypes`). (For now, the set itself is also immutable via the api.) For now we don't have any namespacing, we just lookup references in all modules and assume unique names. We leave adding hierarchical names for future work. We also leave having multiple editable modules for future work. BREAKING CHANGE: this change requires a database migration, as it changes the representation of `Prog`. However, since this is just serialised to json and stored as a blob in the DB, it requires no schema changes. Since we have no programs we need to preserve, we decided not to bother with a migration. This means that DBs created before this commit will not load with a primer containing this commit.
This is basically an action, except we don't expose it in the API. We will delay doing so until we have a nice way for a frontend to refer to a module. I.e. we would like to say "import the User1.ProjectFoo.ModuleBar" module, rather than having to explicitly give the code contained within the module. This utility does not check that imported modules have disjointly-named contents. We intend to shortly require a hierarchical naming scheme which will address this concern. At that point we will also address the issue of disjoint IDs of contents, and our freshness guarantees. The reason we delay worrying about disjointness/uniqueness is that both it and being able to expose this nicely in the API require the notion of a module having some short name, rather than having to explicitly pass around all the code contained in the module.
Author
|
The pull request #293 is mergeable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 combination of pull requests has been checked successfully 🎉
Branch main (791db90) and #293 are embarked together for merge.
This pull request has been created by Mergify to speculatively check the mergeability of #293.
You don't need to do anything. Mergify will close this pull request automatically when it is complete.
Required conditions of queue
defaultfor merge:base=maincheck-success="buildkite/primer/pr/required"More informations about Mergify merge queue can be found in the documentation.
Mergify commands
You can also trigger Mergify actions by commenting on this pull request:
@Mergifyio refreshwill re-evaluate the queue rulesAdditionally, on Mergify dashboard you can:
Finally, you can contact us on https://mergify.com