Expose Copilot.Compile.Bluespec.External. Refs #36.#37
Closed
RyanGlScott wants to merge 3 commits intomasterfrom
Closed
Expose Copilot.Compile.Bluespec.External. Refs #36.#37RyanGlScott wants to merge 3 commits intomasterfrom
Copilot.Compile.Bluespec.External. Refs #36.#37RyanGlScott wants to merge 3 commits intomasterfrom
Conversation
The non-public `Copilot.Compiler.Bluespec.External` module lives under a `shared/` directory so that it be imported by both the library code and the test suite code. This is a questionable design, as if the test suite needs to use the code, then it should be exposed by the library. The comments in `Copilot.Compiler.Bluespec.External` mistakenly reference the C99 backend instead of the Bluespec backend, which will make it confusing for users when this module is exposed as part of the public interface. This commit fixes the comments to reference the Bluespec backend instead.
The non-public `Copilot.Compiler.Bluespec.External` module lives under a `shared/` directory so that it be imported by both the library code and the test suite code. This is a questionable design, as if the test suite needs to use the code, then it should be exposed by the library. This commit moves `Copilot.Compiler.Bluespec.External` from `shared/` to `src/`, exposes the module as part of the public API, and removes the `shared/` directory. As a result, the test suite can now import `Copilot.Compiler.Bluespec.External` like it does other parts of the `copilot-bluespec` API.
21a9435 to
091a7db
Compare
Member
|
If it wasn't for the tests, would this new module be exposed by the library? |
Collaborator
Author
|
No, it wouldn't be. (This is the same reason why it's not exposed in |
Member
|
The please just duplicate the code for now. As much as it sucks and I hate the code duplication, at least it leaves a cleaner design for the library itself (nothing is exposed that shouldn't). I agree that longer term there may be a better place for this that can be shared between |
Collaborator
Author
|
Sounds good to me. I'll open a separate PR for this. |
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.
The non-public
Copilot.Compiler.Bluespec.Externalmodule lives under ashared/directory so that it be imported by both the library code and thetest suite code. This is a questionable design, as if the test suite needs to
use the code, then it should be exposed by the library.
This commit moves
Copilot.Compiler.Bluespec.Externalfromshared/tosrc/, exposes the module as part of the public API, and removes theshared/directory. As a result, the test suite can now import
Copilot.Compiler.Bluespec.Externallike it does other parts of thecopilot-bluespecAPI.Fixes #36.