Skip to content

Use getHostName from network, drop network-bsd - #119

Merged
ysangkok merged 2 commits into
masterfrom
fix-gethostname-ambiguity
Oct 30, 2026
Merged

ysangkok merged 2 commits into
masterfrom
fix-gethostname-ambiguity

Conversation

@ysangkok

@ysangkok ysangkok commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

network 3.2.10.0 added getHostName to Network.Socket (haskell/network#621), so it is now ambiguous with Network.BSD.getHostName, and the build fails:

Network/Mail/SMTP.hs:116:68: error: [GHC-87543]
    Ambiguous occurrence ‘getHostName’.
    It could refer to
       either ‘Network.Socket.getHostName’,
           or ‘Network.BSD.getHostName’,

getHostName was the only thing network-bsd was used for, so this switches to the one in network and drops the dependency:

  • Remove the Network.BSD import and the network-bsd dependency
  • Require network >= 3.2.10 (it calls gethostname like the network-bsd version, and has POSIX and Windows implementations)
  • Update the haskell-nix/hackage input in flake.lock, whose index predated network 3.2.10, so the nix integration test can solve
  • Add a CHANGELOG entry

network 3.2.10.0 added getHostName to Network.Socket, which clashes
with the one imported from Network.BSD.
network >= 3.2.10 provides getHostName, which was the only thing
network-bsd was used for. Update the haskell.nix Hackage index so the
nix integration test can find network 3.2.10.
@ysangkok ysangkok changed the title Fix ambiguous getHostName with network >= 3.2.10 Use getHostName from network, drop network-bsd Oct 30, 2026
@ysangkok
ysangkok enabled auto-merge October 30, 2026 23:38
@ysangkok
ysangkok merged commit f132816 into master Oct 30, 2026
6 checks passed
@ysangkok
ysangkok deleted the fix-gethostname-ambiguity branch October 30, 2026 23:45
@alaendle

alaendle commented Nov 3, 2026

Copy link
Copy Markdown

@spencerjanssen, Needs a new release, will disable the package on stackage in the meantime.

alaendle added a commit to commercialhaskell/stackage that referenced this pull request Nov 3, 2026
@ysangkok

ysangkok commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

@alaendle I uploaded a new release

@alaendle

alaendle commented Nov 5, 2026

Copy link
Copy Markdown

Thanks @ysangkok - I reinclude the package...

alaendle added a commit to commercialhaskell/stackage that referenced this pull request Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants