Skip to content

Commit

Permalink
Merge pull request #1517 from FarmBot/staging
Browse files Browse the repository at this point in the history
v15.4.10
  • Loading branch information
gabrielburnworth authored Jul 4, 2024
2 parents ebe7a24 + d0c0441 commit b42e9ab
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

# 15.4.10

* Prevent unnecessary scheduler exit upon encountering duplicate variables when one is a placeholder.

# 15.4.9

* Add `tool.flow_rate_ml_per_s`.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
15.4.9
15.4.10
8 changes: 6 additions & 2 deletions lib/celery/compilers/scope.ex
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,17 @@ defmodule FarmbotOS.Celery.Compiler.Scope do
if has_key?(state, key) do
state
else
set(state, key, value)
reckless_set(state, key, value)
end
end)
end

def has_key?(scope, label), do: Map.has_key?(scope.declarations, label)

def reckless_set(scope, key, value) do
%{scope | declarations: Map.put(scope.declarations, key, value)}
end

@nothing %AST{kind: :nothing, args: %{}, body: []}
@not_allowed [
:location_placeholder,
Expand All @@ -65,7 +69,7 @@ defmodule FarmbotOS.Celery.Compiler.Scope do
declr = Map.put(scope.declarations, key, @nothing)
%{scope | declarations: declr, valid: false}
else
%{scope | declarations: Map.put(scope.declarations, key, value)}
reckless_set(scope, key, value)
end
end

Expand Down

0 comments on commit b42e9ab

Please sign in to comment.