Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift SDK Generator cannot download files via an HTTP proxy #145

Open
euanh opened this issue Nov 8, 2024 · 0 comments
Open

Swift SDK Generator cannot download files via an HTTP proxy #145

euanh opened this issue Nov 8, 2024 · 0 comments
Assignees
Labels
bug Something isn't working test suite Changes to generator's test suite

Comments

@euanh
Copy link
Contributor

euanh commented Nov 8, 2024

Some environments, such as on CI servers, only allow HTTP requests to the Internet via an HTTP proxy. SDK Generator does not currently support using a proxy, so it cannot work in these environments.

Proxy addresses are often configured through several well-known environment variables such as http_proxy, HTTPS_PROXY and so on. SDK Generator should use these variables if present, and also offer command line arguments to configure or ignore proxies.

euanh added a commit to euanh/swift-sdk-generator that referenced this issue Nov 8, 2024
The EndToEnd tests cannot currently be run:

* they deadlock when run under `swift test` (swiftlang#143)
* the CI requires the use of an HTTP proxy to download from the
  Internet, but SDK generator does not support proxies (swiftlang#145)

The tests are conditionally compiled only on Linux, so we must skip
them in CI.
euanh added a commit to euanh/swift-sdk-generator that referenced this issue Nov 8, 2024
The EndToEnd tests cannot currently be run:

* they deadlock when run under `swift test` (swiftlang#143)
* the CI requires the use of an HTTP proxy to download from the
  Internet, but SDK generator does not support proxies (swiftlang#145)

The tests are conditionally compiled only on Linux, so we must skip
them in CI.

Fixes swiftlang#45
euanh added a commit to euanh/swift-sdk-generator that referenced this issue Nov 8, 2024
The EndToEnd tests cannot currently be run:

* they deadlock when run under `swift test` (swiftlang#143)
* the CI requires the use of an HTTP proxy to download from the
  Internet, but SDK generator does not support proxies (swiftlang#145)

The tests are conditionally compiled only on Linux, so we must skip
them in CI.

Fixes swiftlang#45
euanh added a commit to euanh/swift-sdk-generator that referenced this issue Nov 8, 2024
The EndToEnd tests cannot currently be run:

* they deadlock when run under `swift test` (swiftlang#143)
* the CI requires the use of an HTTP proxy to download from the
  Internet, but SDK generator does not support proxies (swiftlang#145)

The tests are conditionally compiled only on Linux, so we must skip
them in CI.

Fixes swiftlang#45
euanh added a commit to euanh/swift-sdk-generator that referenced this issue Nov 8, 2024
The EndToEnd tests cannot currently be run:

* they deadlock when run under `swift test` (swiftlang#143)
* the CI requires the use of an HTTP proxy to download from the
  Internet, but SDK generator does not support proxies (swiftlang#145)

The tests are not compiled on macOS, but this commit marks
them with `XCTSkip` so they are not run on Linux either.

Fixes swiftlang#45
euanh added a commit to euanh/swift-sdk-generator that referenced this issue Nov 8, 2024
The EndToEnd tests cannot currently be run:

* they deadlock when run under `swift test` (swiftlang#143)
* the CI requires the use of an HTTP proxy to download from the
  Internet, but SDK generator does not support proxies (swiftlang#145)

The tests are not compiled on macOS, but this commit marks
them with `XCTSkip` so they are not run on Linux either.

Future commits will loosen these restrictions.

Fixes swiftlang#45
euanh added a commit that referenced this issue Nov 8, 2024
* QueryEngine: Calculate stable hashes for Foundation.URL and FoundationEssentials.URL

Until Swift 6.0, the fully-qualified name of the URL type was
`Foundation.URL`.  After the adoption of FoundationEssentials, the
name changed to `FoundationEssentials.URL`.  This difference causes
the hashes to change, so for backwards compatibility we pin the
type name to `Foundation.URL`.

Fixes #45

* tests: Run tests on Linux CI

The EndToEnd tests cannot currently be run:

* they deadlock when run under `swift test` (#143)
* the CI requires the use of an HTTP proxy to download from the
  Internet, but SDK generator does not support proxies (#145)

The tests are not compiled on macOS, but this commit marks
them with `XCTSkip` so they are not run on Linux either.

Future commits will loosen these restrictions.

Fixes #45
euanh added a commit to euanh/swift-sdk-generator that referenced this issue Nov 18, 2024
Swift Package Manager's linker flag handling changed between
5.9 and 5.10.   The flags which work for 5.9 cause linking failures
5.10 and later, and vice versa:

  swiftlang/swift-package-manager#7222

This commit generates workaround flags for 5.9 and new-style flags
for all other versions.

The EndToEnd tests currently cannot run in CI, so this change was
tested locally. (Issue swiftlang#145)

* The basic 'hello world' example generated by `swift package init`
  built succesfully with 5.9.2, 5.10.1 and 6.0.2 SDKs on x86_64 and aarch64.
* A more complex example using Vapor built succesfully with 5.9.2, 5.10.1.  6.0.2
  failed because of the CShims problem reported in Issue swiftlang#138.
euanh added a commit to euanh/swift-sdk-generator that referenced this issue Nov 18, 2024
Swift Package Manager's linker flag handling changed between
5.9 and 5.10.   The flags which work for 5.9 cause linking failures
5.10 and later, and vice versa:

  swiftlang/swift-package-manager#7222

This commit generates workaround flags for 5.9 and new-style flags
for all other versions.

The EndToEnd tests currently cannot run in CI, so this change was
tested locally. (Issue swiftlang#145)

* The basic 'hello world' example generated by `swift package init`
  built successfully with 5.9.2, 5.10.1 and 6.0.2 SDKs on x86_64 and aarch64.
* A more complex example using Vapor built succesfully with 5.9.2, 5.10.1.  6.0.2
  failed because of the CShims problem reported in Issue swiftlang#138.
euanh added a commit that referenced this issue Nov 18, 2024
Swift Package Manager's linker flag handling changed between 5.9 and 5.10.   The flags which work for 5.9 cause linking failures 5.10 and later, and vice versa:

  swiftlang/swift-package-manager#7222

This commit generates workaround flags for 5.9 and new-style flags for all other versions.

The EndToEnd tests currently cannot run in CI, so this change was tested locally. (Issue #145)

* The basic 'hello world' example generated by `swift package init` built successfully with 5.9.2, 5.10.1 and 6.0.2 SDKs on x86_64 and aarch64.
* A more complex example using Vapor built succesfully with 5.9.2, 5.10.1.  6.0.2 failed because of the CShims problem reported in Issue #138.
@euanh euanh self-assigned this Nov 25, 2024
@euanh euanh added bug Something isn't working test suite Changes to generator's test suite labels Nov 27, 2024
@MaxDesiatov MaxDesiatov changed the title SDK Generator cannot download files via an HTTP proxy Swift SDK Generator cannot download files via an HTTP proxy Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working test suite Changes to generator's test suite
Projects
None yet
Development

No branches or pull requests

1 participant