https://github.com/changkun/cyclemod2
enable import cycle using modules? (part 2)
https://github.com/changkun/cyclemod2
Last synced: 11 months ago
JSON representation
enable import cycle using modules? (part 2)
- Host: GitHub
- URL: https://github.com/changkun/cyclemod2
- Owner: changkun
- Created: 2021-02-27T16:36:02.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-27T17:33:27.000Z (almost 5 years ago)
- Last Synced: 2025-01-04T23:17:46.086Z (about 1 year ago)
- Language: Go
- Size: 2.93 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This module `cyclemod2` and a [brother module `cyclemod`](https://github.com/changkun/cyclemod) demonstrates
the following interesting relationship:
Assume we have two modules: A and B.
- A@v1.0.0 depends B@v2.0.0
- B@v2.0.0 depends A@v0.2.0
- A@v0.2.0 depends B@v0.1.0
- B@v0.1.0 depends A@v0.1.0
- A@v0.1.0 has no dependency
That means, in A:
```
import "changkun.de/x/cyclemod2/v2"
```
and in B:
```
import "changkun.de/x/cyclemod"
```
Will this leads to the infamous "import cycle not allowed"?