Skip to content

Commit e57a354

Browse files
authored
Revert "Write empty Deps.toml and Compat.toml files, but don't write empty WeakDeps.toml or WeakCompat.toml files (#82)"
This reverts commit 05fd1ff.
1 parent 4807c31 commit e57a354

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

src/register.jl

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -387,14 +387,7 @@ function update_deps_file(pkg::Project,
387387
end
388388

389389
deps_data[pkg.version] = deps
390-
if file == "Deps.toml"
391-
# We always write the `Deps.toml` file, even if it is empty
392-
write_this_file = true
393-
else
394-
# We only write the `WeakDeps.toml` file if it is not empty
395-
write_this_file = !isempty(deps_data) && !all(isempty, values(deps_data))
396-
end
397-
if write_this_file
390+
if !isempty(deps_data) && !all(isempty, values(deps_data))
398391
Compress.save(deps_file, deps_data)
399392
end
400393
end
@@ -498,14 +491,7 @@ function update_compat_file(pkg::Project,
498491
end
499492

500493
compat_data[pkg.version] = d
501-
if file == "Compat.toml"
502-
# We always write the `Compat.toml` file, even if it is empty
503-
write_this_file = true
504-
else
505-
# We only write the `WeakCompat.toml` file if it is not empty
506-
write_this_file = !isempty(compat_data) && !all(isempty, values(compat_data))
507-
end
508-
if write_this_file
494+
if !isempty(compat_data) && !all(isempty, values(compat_data))
509495
Compress.save(compat_file, compat_data)
510496
end
511497
end

0 commit comments

Comments
 (0)