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

git: Always use OpenSSL on win32 #3554

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
toolchain: stable
target: ${{ matrix.target }}
- name: Build release binary
run: cargo build --target ${{ matrix.target }} --verbose --release --features packaging,vendored-openssl
run: cargo build --target ${{ matrix.target }} --verbose --release --features packaging,openssl-on-win32,vendored-openssl
- name: Build archive
shell: bash
run: |
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed bugs

* When built with the `openssl-on-win32` feature, ED25519 host keys are supported
when connecting to Git+SSH remotes on Windows.

## [0.17.1] - 2024-05-07

### Fixed bugs
Expand Down
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ indoc = "2.0.4"
insta = { version = "1.38.0", features = ["filters"] }
itertools = "0.12.1"
libc = { version = "0.2.154" }
libssh2-sys = { version = "0.3.0" }
Copy link
Collaborator

Choose a reason for hiding this comment

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

This dependency could be made Windows-only by moving it to a [target.'cfg(windows)'.dependencies] section.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This isn't in the dependencies key; it's in the workspace.dependencies key. I tried target.'cfg(windows)'.workspace.dependencies and it said it was not allowed.

maplit = "1.0.2"
minus = { version = "5.6.1", features = ["dynamic_output", "search"] }
num_cpus = "1.16.0"
Expand Down
4 changes: 4 additions & 0 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ unicode-width = { workspace = true }
[target.'cfg(unix)'.dependencies]
libc = { workspace = true }

[target.'cfg(windows)'.dependencies]
libssh2-sys = { workspace = true }

[dev-dependencies]
anyhow = { workspace = true }
assert_cmd = { workspace = true }
Expand All @@ -104,6 +107,7 @@ jj-cli = { path = ".", features = ["test-fakes"], default-features = false }
[features]
default = ["watchman"]
bench = ["dep:criterion"]
openssl-on-win32 = ["libssh2-sys/openssl-on-win32", "jj-lib/openssl-on-win32"]
packaging = []
test-fakes = ["jj-lib/testing"]
vendored-openssl = ["git2/vendored-openssl", "jj-lib/vendored-openssl"]
Expand Down
4 changes: 3 additions & 1 deletion lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ hex = { workspace = true }
ignore = { workspace = true }
itertools = { workspace = true }
jj-lib-proc-macros = { workspace = true }
libssh2-sys = { workspace = true }
maplit = { workspace = true }
once_cell = { workspace = true }
pest = { workspace = true }
Expand Down Expand Up @@ -92,6 +93,7 @@ tokio = { workspace = true, features = ["full"] }

[features]
default = []
vendored-openssl = ["git2/vendored-openssl"]
openssl-on-win32 = ["libssh2-sys/openssl-on-win32"]
vendored-openssl = ["git2/vendored-openssl", "libssh2-sys/openssl-on-win32"]
watchman = ["dep:tokio", "dep:watchman_client"]
testing = []