moduleNameAssertAlias vs module name
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- kotlin
- Domain
- build-system
Research direction
Start by reproducing the issue with the attached MyApplication.zip and the moduleGraphAssert configuration shown in the report. Trace how moduleNameAssertAlias and the module name are represented when allow patterns are matched. Done means a rule can compare both forms in one expression while existing alias-only and module-name-only patterns continue to work.
Written by the indexing model from the issue text.
Description
When ext.moduleNameAssertAlias is set, there is no available to allow dependency by its name. There is available to use moduleNameAssertAlias value ONLY.
I would like to use moduleNameAssertAlias AND module name in regex at the same time.
For example modules:
- composeApp
- libUi
- libImpl
- testUi
- testImpl
When add val moduleNameAssertAlias: String by extra("Ui") in shared:libUi gradle module i am not able to use it in allow regex like:
moduleGraphAssert {
configurations += setOf("commonMainImplementation", "commonMainApi")
maxHeight = 3
allowed = arrayOf(
// ":composeApp -> Ui",
":composeApp -> :shared:libUi",
".*Ui -> ^(?!.*Ui$).*",
"^(?!.*Ui).* -> .*",
)
restricted = arrayOf(
)
assertOnAnyBuild = true
}
if comment moduleNameAssertAlias in gradle file, the allow array accepts condition: ":composeApp -> :shared:libUi",
But i would like to use in condition moduleNameAssertAlias and module name at the same time to compare them.
The compare string could be Ui"(':shared:libUi') like you write in exception:
[':composeApp' -> ':shared', ':composeApp' -> "Ui"(':shared:libUi')] not allowed by any of [':composeApp -> :shared:libUi', '.*Ui -> ^(?!.*Ui$).*', '^(?!.*Ui).* -> .*']
Example project
MyApplication.zip
- Dominant language
- Kotlin
- Stars
- 640
- Forks
- 35
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from jraska/modules-graph-assert
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
jraska/modules-graph-assert#288 · 11 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
jraska/modules-graph-assert#339 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
jraska/modules-graph-assert#326 · 6 reactions ·
-
documentation
Difficulty 4/5 3-5 days Newbie friendliness 42/100
jraska/modules-graph-assert#325 · 5 comments · 6 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
jraska/modules-graph-assert#315 · 3 comments ·
All issues in jraska/modules-graph-assert
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Anthonyy232/Paperize#614 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bitcoindevkit/bdk-ffi#1125 ·
-
Issue: Bug
Difficulty 1/5 Under an hour Newbie friendliness 91/100
OpenAPITools/openapi-generator#24978 ·
-
helsemelding-json-schema json-schema-core
Difficulty 2/5 1-3 hours Newbie friendliness 68/100