Skip to content

refactor!: add RequireQualifiedAccess to Erlang module#51

Merged
dbrattli merged 1 commit intomainfrom
refactor/require-qualified-erlang
Mar 29, 2026
Merged

refactor!: add RequireQualifiedAccess to Erlang module#51
dbrattli merged 1 commit intomainfrom
refactor/require-qualified-erlang

Conversation

@dbrattli
Copy link
Copy Markdown
Collaborator

Summary

  • Extract shared opaque types (Pid, Atom, Ref, TimerRef) to Types.fs in the Fable.Beam namespace
  • Add [<RequireQualifiedAccess>] to the Erlang module to prevent name collisions (e.g. spawn, self, send) with other libraries like Fable.Actor
  • Update all src bindings and tests to use qualified Erlang. prefix for BIF calls

BREAKING CHANGE: Erlang BIF functions now require Erlang. prefix (e.g. Erlang.spawn, Erlang.self). Types are unaffected — open Fable.Beam still brings Pid, Atom, Ref, TimerRef into scope.

Test plan

  • just test-dotnet passes (0 errors)
  • just test full BEAM pipeline

🤖 Generated with Claude Code

Extract shared opaque types (Pid, Atom, Ref, TimerRef) to a new
Types.fs in the Fable.Beam namespace so they remain accessible via
open Fable.Beam. Mark the Erlang module with [<RequireQualifiedAccess>]
to prevent name collisions with other libraries (e.g. Fable.Actor)
that define spawn, self, send etc.

BREAKING CHANGE: Erlang BIF functions now require Erlang. prefix
(e.g. Erlang.spawn, Erlang.self). Types are unaffected — open
Fable.Beam still brings Pid, Atom, Ref, TimerRef into scope.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dbrattli dbrattli merged commit 80f7f19 into main Mar 29, 2026
2 checks passed
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.

1 participant