@@ -310,7 +310,7 @@ subroutine add_project(self, package, error)
310
310
311
311
! After resolving all dependencies, check if we have cached ones to avoid updates
312
312
if (allocated (self% cache)) then
313
- call new_dependency_tree(cached, cache= self% cache)
313
+ call new_dependency_tree(cached, verbosity = 2 , cache= self% cache)
314
314
call cached% load(self% cache, error)
315
315
if (allocated (error)) return
316
316
@@ -441,7 +441,7 @@ subroutine add_dependency_node(self, dependency, error)
441
441
! the same dependency from a lower branch of the dependency tree, the existing one from
442
442
! the manifest has priority
443
443
if (dependency% cached) then
444
- if (dependency_has_changed(dependency, self% dep(id))) then
444
+ if (dependency_has_changed(dependency, self% dep(id), self % verbosity, self % unit )) then
445
445
if (self% verbosity> 0 ) write (self% unit, out_fmt) " Dependency change detected:" , dependency% name
446
446
self% dep(id)% update = .true.
447
447
else
@@ -1182,26 +1182,44 @@ pure subroutine resize_dependency_node(var, n)
1182
1182
end subroutine resize_dependency_node
1183
1183
1184
1184
! > Check if a dependency node has changed
1185
- logical function dependency_has_changed (cached , manifest ) result(has_changed)
1185
+ logical function dependency_has_changed (cached , manifest , verbosity , iunit ) result(has_changed)
1186
1186
! > Two instances of the same dependency to be compared
1187
1187
type (dependency_node_t), intent (in ) :: cached, manifest
1188
1188
1189
+ ! > Log verbosity
1190
+ integer , intent (in ) :: verbosity, iunit
1191
+
1189
1192
has_changed = .true.
1190
1193
1191
1194
! > All the following entities must be equal for the dependency to not have changed
1192
- if (manifest_has_changed(cached= cached, manifest= manifest)) return
1195
+ if (manifest_has_changed(cached= cached, manifest= manifest, verbosity = verbosity, iunit = iunit )) return
1193
1196
1194
1197
! > For now, only perform the following checks if both are available. A dependency in cache.toml
1195
1198
! > will always have this metadata; a dependency from fpm.toml which has not been fetched yet
1196
1199
! > may not have it
1197
1200
if (allocated (cached% version) .and. allocated (manifest% version)) then
1198
- if (cached% version /= manifest% version) return
1201
+ if (cached% version /= manifest% version) then
1202
+ if (verbosity> 1 ) write (iunit,out_fmt) " VERSION has changed: " // cached% version% s()// " vs. " // manifest% version% s()
1203
+ return
1204
+ endif
1205
+ else
1206
+ if (verbosity> 1 ) write (iunit,out_fmt) " VERSION has changed presence "
1199
1207
end if
1200
1208
if (allocated (cached% revision) .and. allocated (manifest% revision)) then
1201
- if (cached% revision /= manifest% revision) return
1209
+ if (cached% revision /= manifest% revision) then
1210
+ if (verbosity> 1 ) write (iunit,out_fmt) " REVISION has changed: " // cached% revision// " vs. " // manifest% revision
1211
+ return
1212
+ endif
1213
+ else
1214
+ if (verbosity> 1 ) write (iunit,out_fmt) " REVISION has changed presence "
1202
1215
end if
1203
1216
if (allocated (cached% proj_dir) .and. allocated (manifest% proj_dir)) then
1204
- if (cached% proj_dir /= manifest% proj_dir) return
1217
+ if (cached% proj_dir /= manifest% proj_dir) then
1218
+ if (verbosity> 1 ) write (iunit,out_fmt) " PROJECT DIR has changed: " // cached% proj_dir// " vs. " // manifest% proj_dir
1219
+ return
1220
+ endif
1221
+ else
1222
+ if (verbosity> 1 ) write (iunit,out_fmt) " PROJECT DIR has changed presence "
1205
1223
end if
1206
1224
1207
1225
! > All checks passed: the two dependencies have no differences
0 commit comments