You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Allow empty subsets of VarInfos (#692)
* Allow empty subsets of VarInfos
* Run JuliaFormatter
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* For VarInfo, fix merge and allow push!!ing new Symbols (#690)
* Fix treatment of gid in merge(::Metadata)
* Allowing pushing new symbols to TypedVarInfo
* Bump patch version to 0.30.1
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@assert~(vn inkeys(vi)) "[push!!] attempt to add an exisitng variable $(getsym(vn)) ($(vn)) to VarInfo (keys=$(keys(vi))) with dist=$dist, gid=$gidset"
1607
+
@assert~(vn inkeys(vi)) "[push!!] attempt to add an existing variable $(getsym(vn)) ($(vn)) to VarInfo (keys=$(keys(vi))) with dist=$dist, gid=$gidset"
1598
1608
elseif vi isa TypedVarInfo
1599
-
@assert~(haskey(vi, vn)) "[push!!] attempt to add an exisitng variable $(getsym(vn)) ($(vn)) to TypedVarInfo of syms $(syms(vi)) with dist=$dist, gid=$gidset"
1609
+
@assert~(haskey(vi, vn)) "[push!!] attempt to add an existing variable $(getsym(vn)) ($(vn)) to TypedVarInfo of syms $(syms(vi)) with dist=$dist, gid=$gidset"
1600
1610
end
1601
1611
1602
1612
val =vectorize(dist, r)
1603
-
1604
-
meta =getmetadata(vi, vn)
1605
-
meta.idcs[vn] =length(meta.idcs) +1
1606
-
push!(meta.vns, vn)
1607
-
l =length(meta.vals)
1608
-
n =length(val)
1609
-
push!(meta.ranges, (l +1):(l + n))
1610
-
append!(meta.vals, val)
1611
-
push!(meta.dists, dist)
1612
-
push!(meta.gids, gidset)
1613
-
push!(meta.orders, get_num_produce(vi))
1614
-
push!(meta.flags["del"], false)
1615
-
push!(meta.flags["trans"], false)
1613
+
sym =getsym(vn)
1614
+
if vi isa TypedVarInfo &&~haskey(vi.metadata, sym)
1615
+
# The NamedTuple doesn't have an entry for this variable, let's add one.
0 commit comments