Commit 76162df
authored
Fix loaded-symbol check for the staging-repo class (#617)
(try ::($name)) was always False for any loaded class: ::($name)
returns the class's type object when bound, type objects coerce to
False in Boolean context, and the try wraps a missing-symbol Failure
into Any (also False). So the `?? ::($name).new ...` branch never
ran; the `!! do { ... $core-repo.resolve(...).distribution ... }`
fallback took every call.
Drop the try. Bare ::($name) returns the type object when the symbol
is bound and a Failure when it is not, so `!~~ Failure` distinguishes
them and the fast path can be reached when the class is already
loaded (which is always the case once CompUnit::Repository::Staging
moves into CORE.setting).1 parent 76389c8 commit 76162df
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1076 | 1076 | | |
1077 | 1077 | | |
1078 | 1078 | | |
1079 | | - | |
| 1079 | + | |
1080 | 1080 | | |
1081 | 1081 | | |
1082 | 1082 | | |
| |||
0 commit comments