Generate Source from the application list does not overwrite existing files

Hi everyone,

I found what looks like a bug in batch code generation.

Steps to reproduce

  1. Open the project application list.
  2. Select several applications that are not marked as obsolete.
  3. Click Generate Source.

Expected: the source of all selected applications is regenerated and the existing files on the server are overwritten.
Actual: the process completes, but the existing files are not updated.

What I observed

  • If I delete the application folders on the server first, the batch generation creates them correctly.
  • If the applications are marked as obsolete, the batch generation works fine.
  • If I open a single application and click Generate Source from inside it, it is regenerated correctly, even if it is not obsolete.

So it looks like the batch generation skips applications that are not obsolete, even when they are explicitly selected.

Why this is a problem
When I change a library that applications use via sc_include, those applications are not marked as obsolete. Since batch generation skips them, the only way to recompile all of them is to empty the folders on the server by hand and generate again, which is slow and error-prone on a large project.

Request

  • Selected applications should always be regenerated (overwriting existing files), whether or not they are obsolete; or
  • applications that use a library via sc_include should be marked as obsolete when that library changes; or at least
  • a “force regenerate” option should be added to batch generation.

ScriptCase version: 10.3.000 (1)
PHP version: 8.2.34

Thanks,
Nicola