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

[curl] Add Unicode support #25865

Merged
merged 9 commits into from
Sep 2, 2022
Merged

[curl] Add Unicode support #25865

merged 9 commits into from
Sep 2, 2022

Conversation

rozdaybeda
Copy link
Contributor

Describe the pull request

  • What does your PR fix?

    Fixes unicode support for curl

  • Which triplets are supported/not supported? Have you updated the CI baseline?

    windows, No

  • Does your PR follow the maintainer guide?

    Yes

  • If you have added/updated a port: Have you run ./vcpkg x-add-version --all and committed the result?

    Yes

If you are still working on the PR, open it as a Draft: https://github.blog/2019-02-14-introducing-draft-pull-requests/

@ghost
Copy link

ghost commented Jul 19, 2022

CLA assistant check
All CLA requirements met.

Comment on lines 35 to 38
if("unicode" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_WINDOWS)
message(FATAL_ERROR "Feature 'unicode' is not supported on non-Windows platforms.")
endif()

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if("unicode" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_WINDOWS)
message(FATAL_ERROR "Feature 'unicode' is not supported on non-Windows platforms.")
endif()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Because of that, see my next comment

Copy link
Contributor

Choose a reason for hiding this comment

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

@rozdaybeda Because you're using "supports": "windows" in vcpkg.json, this is no longer needed and can be removed as proposed by @autoantwort.

ports/curl/vcpkg.json Outdated Show resolved Hide resolved
@JonLiu1993 JonLiu1993 changed the title Add Unicode support to Curl [curl] Add Unicode support Jul 20, 2022
@JonLiu1993 JonLiu1993 added category:new-port The issue is requesting a new library to be added; consider making a PR! requires:author-response labels Jul 20, 2022
@m-kuhn
Copy link
Contributor

m-kuhn commented Jul 20, 2022

Should this be added to default features?

@rozdaybeda
Copy link
Contributor Author

Should this be added to default features?

I think it should be enabled by default for windows

github-actions[bot]
github-actions bot previously approved these changes Jul 21, 2022
@JonLiu1993
Copy link
Member

@rozdaybeda, Can you please resolve the conflicts against master?

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

PRs must add only one version and must not modify any published versions

When making any changes to a library, the version or port-version in vcpkg.json or CONTROL must be modified.

error: checked-in files for curl have changed but the version was not updated
version: 7.84.0#1
old SHA: 4d64a4ac7f080159be045ccbf0a7fa81ef859cfa
new SHA: 1606b7897eff4ebf08becb144b88768a8d5e6236
Did you remember to update the version or port version?
Use --overwrite-version to bypass this check
***No files were updated***

@JonLiu1993
Copy link
Member

@rozdaybeda, I agree with @autoantwort, can you revise it?

alexander.rozdaybeda added 2 commits August 10, 2022 10:36
github-actions[bot]
github-actions bot previously approved these changes Aug 11, 2022
@JonLiu1993
Copy link
Member

@rozdaybeda, These two suggestions should be adopted, what do you think?
#25865 (comment)
#25865 (comment)

@rozdaybeda
Copy link
Contributor Author

The first one doesn't fit and here's why: #25865
I think it makes sense to add only the second suggestion.

Thanks

github-actions[bot]
github-actions bot previously approved these changes Aug 12, 2022
@JonLiu1993 JonLiu1993 added category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist and removed requires:author-response category:new-port The issue is requesting a new library to be added; consider making a PR! labels Aug 12, 2022
@JonLiu1993
Copy link
Member

JonLiu1993 commented Aug 12, 2022

All functions were successfully tested except for feature 'sectransp' in the following triples:

  • x86-windows
  • x64-windows

@JonLiu1993 JonLiu1993 added the info:reviewed Pull Request changes follow basic guidelines label Aug 12, 2022
Copy link
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

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

I don't believe we can accept this because it's using a feature to control alternatives: https://github.com/microsoft/vcpkg/blob/master/docs/maintainers/maintainer-guide.md#do-not-use-features-to-control-alternatives-in-published-interfaces

It may make sense to do unconditionally on Windows (which is why I'm not outright closing the PR).

@BillyONeal BillyONeal added requires:author-response and removed info:reviewed Pull Request changes follow basic guidelines labels Aug 12, 2022
github-actions[bot]
github-actions bot previously approved these changes Aug 15, 2022
@rozdaybeda rozdaybeda requested a review from BillyONeal August 17, 2022 07:52
github-actions[bot]
github-actions bot previously approved these changes Aug 22, 2022
@BillyONeal
Copy link
Member

I don't believe we can accept this because it's using a feature to control alternatives: https://github.com/microsoft/vcpkg/blob/master/docs/maintainers/maintainer-guide.md#do-not-use-features-to-control-alternatives-in-published-interfaces

It may make sense to do unconditionally on Windows (which is why I'm not outright closing the PR).

I don't believe anything about this has been addressed.

To be clear, it can never be a requirement for correctness that a feature is not installed.

@rozdaybeda
Copy link
Contributor Author

@BillyONeal does it work for you?

if(VCPKG_TARGET_IS_WINDOWS)
    list(APPEND OPTIONS -DENABLE_UNICODE=ON)
endif()

Or would that be better?

vcpkg_cmake_configure(
    SOURCE_PATH "${SOURCE_PATH}"
    OPTIONS 
        "-DCMAKE_PROJECT_INCLUDE=${CMAKE_CURRENT_LIST_DIR}/cmake-project-include.cmake"
        ${FEATURE_OPTIONS}
        ${OPTIONS}
        ...
	-DENABLE_UNICODE=ON
    OPTIONS_DEBUG
        -DENABLE_DEBUG=ON
)

@BillyONeal
Copy link
Member

@BillyONeal does it work for you?

if(VCPKG_TARGET_IS_WINDOWS)
    list(APPEND OPTIONS -DENABLE_UNICODE=ON)
endif()

It works for me!

@bagder @MarcelRaad @apique Is there any reason we should not just turn this on unconditionally?

@MarcelRaad
Copy link

It doesn't do anything on non-Windows platforms, so turning it on unconditionally shouldn't hurt.

@BillyONeal BillyONeal merged commit f4b9092 into microsoft:master Sep 2, 2022
@BillyONeal
Copy link
Member

Thanks for your contribution @rozdaybeda !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants