bazelbuild / bazelbuild/rules_swift

Split derived files generation errors in incremental mode

Open
#835 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Starlark
Stars
353
Forks
172
Avg merge
23h 14m
Merged PRs (30d)
8

Description

The documentation for `swift.split_derived_files_generation` mentions whole module optimization, so this feature may only be applicable to that compilation mode:

```
# If enabled and whole module optimisation is being used, the `*.swiftdoc`,
# `*.swiftmodule` and `*-Swift.h` are generated with a separate action
# rather than as part of the compilation.
SWIFT_FEATURE_SPLIT_DERIVED_FILES_GENERATION = "swift.split_derived_files_generation"
```

When this feature is enabled and incremental mode is used, then the following error is seen:

```
error: merge-module command failed with exit code 1 (use -v to see invocation)
:0: error: error opening input file '/var/folders/ws/gbr_5dz97rncvmckbmzl4h7r0000gn/T/TemporaryDirectory.xeR92j/I18N-1.swiftmodule' (No such file or directory)
```

Can this feature be used for incremental mode? If this feature is only relevant for whole module optimization, then would it be possible to output an error to that effect?

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported failure with `swift.split_derived_files_generation` enabled in incremental mode, then inspect how the generated `.swiftmodule` inputs are produced and passed to the merge-module action. Done means incremental mode either works with the feature or reports a clear limitation when the feature is only valid for whole-module optimization.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.