Skip to content

Navigation Menu

Sign in
Sign up

[SwiftDriver] Part III - Introduce synchronization between swift-frontend invocations - #210

Merged
polac24 merged 6 commits into
spotify:master from
polac24:add-driver-sync
Jun 6, 2023
Merged

[SwiftDriver] Part III - Introduce synchronization between swift-frontend invocations #210
polac24 merged 6 commits into
spotify:master from
polac24:add-driver-sync

Conversation

@polac24

@polac24 polac24 commented Jun 4, 2023
edited
Loading

Copy link
Copy Markdown
Collaborator

This is the main PR of the Swift driver integration: synchronizes all swift-frontend invocations so emit-module (which is responsible to make the last check if the cached artifact can be used) is blocking swift-frontent -c (compilation) invocations.

Context

Because the design and implementation might not be obvious(relies on the swift driver integration in Xcode), they are documented in the markdown file (part of this PR), available to review here.

Previous PRs (#209 and #208)

Next steps

  • Add swift-frontent executables to the released .zip package
  • Add integration E2E tests
  • Include support for integrations (both standalone and CocoaPods)

^ All these missing parts will be added in Part IV (Draft)

Comment thread README.md
```shell
ditto "${SCRIPT_INPUT_FILE_0}" "${SCRIPT_OUTPUT_FILE_0}"
[ -f "${SCRIPT_INPUT_FILE_1}" ] && ditto "${SCRIPT_INPUT_FILE_1}" "${SCRIPT_OUTPUT_FILE_1}" || rm "${SCRIPT_OUTPUT_FILE_1}"
[ -f "${SCRIPT_INPUT_FILE_1}" ] && ditto "${SCRIPT_INPUT_FILE_1}" "${SCRIPT_OUTPUT_FILE_1}" || rm -f "${SCRIPT_OUTPUT_FILE_1}"

@polac24 polac24 Jun 4, 2023

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sidefix: found that if a first build has a cache miss, this snippet fails with an error that $SCRIPT_OUTPUT_FILE_1 doesn't exist. In such cases, we can safely no-op (so forcing rm)

@aleksandergrzyb aleksandergrzyb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

Comment thread README.md

## Architectural designs

Follow the [Architectural designs](docs/design/ArchitecturalDesigns.md) document that describes and documents XCRemoteCache designs and implementation details.

@aleksandergrzyb aleksandergrzyb Jun 6, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Minor - the graphs are hard to read for dark mode.

@polac24 polac24 Jun 6, 2023

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for spotting that! Fixed it.

/// the critical section, the code realizes that remote cache cannot be used
/// (in practice - a new file has been added)
/// None of compilation process (so with '-c' args) can continue until the entire emit-module logic finishes
/// Because it is expected to happen no that often and emit-module is usually quite fast, this makes the

@aleksandergrzyb aleksandergrzyb Jun 6, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Because it is expected to happen no that often and emit-module is usually quite fast, this makes the
/// Because it is expected to happen not that often and emit-module is usually quite fast, this makes the

polac24 reacted with thumbs up emoji
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@PatrikBillgren PatrikBillgren Awaiting requested review from PatrikBillgren
@vadim-smal vadim-smal Awaiting requested review from vadim-smal
@acbdev acbdev Awaiting requested review from acbdev
1 more reviewer
@aleksandergrzyb aleksandergrzyb aleksandergrzyb approved these changes
Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /