Skip to content

Commit

Permalink
Chore: hardcode default scope
Browse files Browse the repository at this point in the history
Problem: 
- it seems to be impossible to set a scope on context, that is also accessible in IEx console
- the list of known ancestors of IEx console does NOT include THE main application

Solution / Workaround: 
- we hardcode a default scope UUID ("000-000000...") and use re-scoping only in unit tests
- that seems to be an OK compromise
  • Loading branch information
mindreframer committed Oct 4, 2024
1 parent 24cd0f1 commit 3752311
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/context.ex
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule Essig.Context do
end

def current_scope do
ProcessTree.get(@appkey)
ProcessTree.get(@appkey, default: "00000000-0000-0000-0000-000000000001")
end

def assert_current_scope! do
Expand Down

0 comments on commit 3752311

Please sign in to comment.