# packages: avoid creating multiple modules with same build.zig · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/db8217f9a080f7c645a6448640a9af65f3944818)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: db8217f9a080f7c645a6448640a9af65f3944818

Requested commit: db8217f9a080f7c645a6448640a9af65f3944818

Commit: db8217f9a080f7c645a6448640a9af65f3944818

Tree: 66469871a26ea98bfbb0fcaf8ccb133150292014

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
packages: avoid creating multiple modules with same build.zig

When there is a diamond dependency, reuse a *Module instead of creating
a redundant one using the same build.zig file. Otherwise, the compile
error "file exists in multiple modules" would occur.

```

## Parents

- [874d3a17ae0f270b3e3f0ece7839d483d749107d](https://git.cafe/gitcafe/zig/commit/874d3a17ae0f270b3e3f0ece7839d483d749107d?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/db8217f9a080f7c645a6448640a9af65f3944818?format=markdown)
