File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -387,7 +387,14 @@ function update_deps_file(pkg::Project,
387387 end
388388
389389 deps_data[pkg. version] = deps
390- if ! isempty (deps_data) && ! all (isempty, values (deps_data))
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
391398 Compress. save (deps_file, deps_data)
392399 end
393400 end
@@ -491,7 +498,14 @@ function update_compat_file(pkg::Project,
491498 end
492499
493500 compat_data[pkg. version] = d
494- if ! isempty (compat_data) && ! all (isempty, values (compat_data))
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
495509 Compress. save (compat_file, compat_data)
496510 end
497511 end
You can’t perform that action at this time.
0 commit comments