Skip to content

Commit

Permalink
fix: weaken builtin widget collision check
Browse files Browse the repository at this point in the history
  • Loading branch information
Kha committed Feb 19, 2024
1 parent 7f08975 commit 1d66c32
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Lean/Widget/UserWidget.lean
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ builtin_initialize widgetModuleAttrImpl : AttributeImpl ←
let e ← mkAppM ``ToModule.toModule #[.const decl []]
let mod ← evalModule e
let env ← getEnv
if let some _ := (← builtinModulesRef.get).find? mod.javascriptHash then
logWarning m!"A builtin widget module with the same hash(JS source code) was already registered."
unless builtin do -- don't warn on collision between previous and current stage
if let some _ := (← builtinModulesRef.get).find? mod.javascriptHash then
logWarning m!"A builtin widget module with the same hash(JS source code) was already registered."
if let some (n, _) := moduleRegistry.getState env |>.find? mod.javascriptHash then
logWarning m!"A widget module with the same hash(JS source code) was already registered at {Expr.const n []}."
let env ← getEnv
Expand Down

0 comments on commit 1d66c32

Please sign in to comment.