-
Notifications
You must be signed in to change notification settings - Fork 49
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
Ability to group modules together #61
Comments
Thanks for the suggestion - yes, I see what you mean. Particularly in this case, it would be much better if this could be expressed in terms of a single contract. This concept could be thought of as the ability to group modules together. I'm going to rename the issue accordingly. I think it's worth doing at some point. |
As far as I understand, this is possible only for independence contract. Am I correct? |
@uhbif19
Would say that harry and james are in the same layer and have the same relationship to the other layers, but at least as far as this rule is concerned they are free to import each other. That kinda gets at larger import linter things that are kicking around in the back of my mind. I feel a bit like instead of layers a generic DAG contract would be nice, this change would move layers a little closer to that. The problem with a generic DAG contract is how do you specify it in a way that is comprehensible. |
I agree with @tolomea. This would work for other contract types (but it's not currently implemented for any contract type). There is a workaround, which is to locate both modules within a common subpackage. For example, in the first example, you could move
Personally, I would find it easier to understand the architectural intentions of a project that was structured in that way. |
I think this is covered by this issue now. #157 |
Currently the various contracts require one module per line.
It would be nice to be able to have multiple per line and to have that be semantically different from when they are on separate lines.
Specifically I'm thinking that where there are two on one line it would say nothing about the relationship between the two just that they have the same relationship to the others.
Formally where there are two on one line it would be equivalent to evaluating the rule twice, one time with each of them in that space.
With regard to one of my current projects this would let me write this:
as
The text was updated successfully, but these errors were encountered: