Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 4 additions & 16 deletions src/register.jl
Original file line number Diff line number Diff line change
Expand Up @@ -387,14 +387,8 @@ function update_deps_file(pkg::Project,
end

deps_data[pkg.version] = deps
if file == "Deps.toml"
# We always write the `Deps.toml` file, even if it is empty
write_this_file = true
else
# We only write the `WeakDeps.toml` file if it is not empty
write_this_file = !isempty(deps_data) && !all(isempty, values(deps_data))
end
if write_this_file
if !isempty(deps_data) && !all(isempty, values(deps_data))
# We intentionally do not write empty `Deps.toml` or `WeakDeps.toml` files
Compress.save(deps_file, deps_data)
end
end
Expand Down Expand Up @@ -498,14 +492,8 @@ function update_compat_file(pkg::Project,
end

compat_data[pkg.version] = d
if file == "Compat.toml"
# We always write the `Compat.toml` file, even if it is empty
write_this_file = true
else
# We only write the `WeakCompat.toml` file if it is not empty
write_this_file = !isempty(compat_data) && !all(isempty, values(compat_data))
end
if write_this_file
if !isempty(compat_data) && !all(isempty, values(compat_data))
# We intentionally do not write empty `Compat.toml` or `WeakCompat.toml` files
Compress.save(compat_file, compat_data)
end
end
Expand Down