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

GH-35134: [C++] Add arrow_vendored namespace around double-conversion library #35135

Merged
merged 2 commits into from
Apr 17, 2023

Conversation

mikelui
Copy link
Contributor

@mikelui mikelui commented Apr 14, 2023

Rationale for this change

See #35134

This change avoids potential symbol collisions when linking Arrow within other libraries.

This actually seems like the original intention (a private namespace) per the following merge: 767c953
The message in that merge is confusing, because it implies that the merge made the library private, when it actually did the opposite (specifically in 3b89b19). A quote is below:

Also, make its use private, because of Windows DLL exports.

What changes are included in this PR?

  • an update.sh script to
    • automatically pull a new version,
    • apply the namespace change,
    • apply a custom patch for seemingly Gandiva (15137e2)
      • this patch will break in future versions of double-conversion, but it is at least documented in the update script
  • the update script is run for the current version

The script is based on: https://github.com/apache/arrow/blob/main/cpp/src/arrow/vendored/fast_float/update.sh

Are these changes tested?

Yes. Built and tests run

Are there any user-facing changes?

Only if users used to depend on using the internal vendored double-conversion libraries for their own code. In such a case, when they upgrade, they would have to specify the arrow_vendored namespace.

@github-actions
Copy link

@github-actions
Copy link

⚠️ GitHub issue #35134 has been automatically assigned in GitHub to PR creator.

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

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

Thanks!

Could you rebase on main for #35145?

I want us to upstream our changes instead of having our patches for easy to maintain.
Could you wait for a response from Gandiva developers?
#34919 (comment)

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Apr 14, 2023
@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Apr 15, 2023
@mikelui
Copy link
Contributor Author

mikelui commented Apr 15, 2023

Could you wait for a response from Gandiva developers? #34919 (comment)

This PR doesn't change the current status-quo of the patched changes, and instead just makes it explicit. Would it make sense to merge this now, and allow for the upstream changes for the version update?

The patch in the script would actually fail since those files don't exist in the newest version of double-conversion (the version being updated in that PR)

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

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

+1

Would it make sense to merge this now, and allow for the upstream changes for the version update?

OK. I see.

@kou kou merged commit 74c9a78 into apache:main Apr 17, 2023
31 of 32 checks passed
@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting change review Awaiting change review labels Apr 17, 2023
@ursabot
Copy link

ursabot commented Apr 18, 2023

Benchmark runs are scheduled for baseline = 6fe4813 and contender = 74c9a78. 74c9a78 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Failed] test-mac-arm
[Finished ⬇️0.0% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️1.97% ⬆️0.18%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] 74c9a784 ec2-t3-xlarge-us-east-2
[Failed] 74c9a784 test-mac-arm
[Finished] 74c9a784 ursa-i9-9960x
[Finished] 74c9a784 ursa-thinkcentre-m75q
[Finished] 6fe48134 ec2-t3-xlarge-us-east-2
[Failed] 6fe48134 test-mac-arm
[Finished] 6fe48134 ursa-i9-9960x
[Finished] 6fe48134 ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

@mikelui mikelui deleted the double-conversion-update branch April 22, 2023 20:18
@liujiacheng777
Copy link
Contributor

@kou @mikelui I would like to update the double-conversion from v3.1.5 to v3.2.1. Can I upgrade based on the original v3.1.5 version and then you add arrow_vendored namespace

@kou
Copy link
Member

kou commented May 8, 2023

Could you do "add arrow_vendored namespace" by the script added by this pull request?

liujiacheng777 pushed a commit to LoongArch-Python/arrow that referenced this pull request May 11, 2023
…nversion library (apache#35135)

### Rationale for this change

See apache#35134

This change avoids potential symbol collisions when linking Arrow within other libraries.

This actually seems like the original intention (a private namespace) per the following merge: 767c953
The message in that merge is confusing, because it implies that the merge made the library private, when it actually did the opposite (specifically in 3b89b19). A quote is below:

>  Also, make its use private, because of Windows DLL exports. 

### What changes are included in this PR?

* an `update.sh` script to 
  * automatically pull a new version, 
  * apply the namespace change, 
  * apply a custom patch for seemingly Gandiva (15137e2)
    * this patch will break in future versions of double-conversion, but it is at least documented in the update script
* the update script is run for the current version 

The script is based on: https://github.com/apache/arrow/blob/main/cpp/src/arrow/vendored/fast_float/update.sh

### Are these changes tested?

Yes. Built and tests run

### Are there any user-facing changes?

Only if users used to depend on using the internal vendored double-conversion libraries for their own code. In such a case, when they upgrade, they would have to specify the `arrow_vendored` namespace. 
* Closes: apache#35134

Authored-by: Mike Lui <mikelui@meta.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
ArgusLi pushed a commit to Bit-Quill/arrow that referenced this pull request May 15, 2023
…nversion library (apache#35135)

### Rationale for this change

See apache#35134

This change avoids potential symbol collisions when linking Arrow within other libraries.

This actually seems like the original intention (a private namespace) per the following merge: 767c953
The message in that merge is confusing, because it implies that the merge made the library private, when it actually did the opposite (specifically in 3b89b19). A quote is below:

>  Also, make its use private, because of Windows DLL exports. 

### What changes are included in this PR?

* an `update.sh` script to 
  * automatically pull a new version, 
  * apply the namespace change, 
  * apply a custom patch for seemingly Gandiva (15137e2)
    * this patch will break in future versions of double-conversion, but it is at least documented in the update script
* the update script is run for the current version 

The script is based on: https://github.com/apache/arrow/blob/main/cpp/src/arrow/vendored/fast_float/update.sh

### Are these changes tested?

Yes. Built and tests run

### Are there any user-facing changes?

Only if users used to depend on using the internal vendored double-conversion libraries for their own code. In such a case, when they upgrade, they would have to specify the `arrow_vendored` namespace. 
* Closes: apache#35134

Authored-by: Mike Lui <mikelui@meta.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
rtpsw pushed a commit to rtpsw/arrow that referenced this pull request May 16, 2023
…nversion library (apache#35135)

### Rationale for this change

See apache#35134

This change avoids potential symbol collisions when linking Arrow within other libraries.

This actually seems like the original intention (a private namespace) per the following merge: 767c953
The message in that merge is confusing, because it implies that the merge made the library private, when it actually did the opposite (specifically in 3b89b19). A quote is below:

>  Also, make its use private, because of Windows DLL exports. 

### What changes are included in this PR?

* an `update.sh` script to 
  * automatically pull a new version, 
  * apply the namespace change, 
  * apply a custom patch for seemingly Gandiva (15137e2)
    * this patch will break in future versions of double-conversion, but it is at least documented in the update script
* the update script is run for the current version 

The script is based on: https://github.com/apache/arrow/blob/main/cpp/src/arrow/vendored/fast_float/update.sh

### Are these changes tested?

Yes. Built and tests run

### Are there any user-facing changes?

Only if users used to depend on using the internal vendored double-conversion libraries for their own code. In such a case, when they upgrade, they would have to specify the `arrow_vendored` namespace. 
* Closes: apache#35134

Authored-by: Mike Lui <mikelui@meta.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[C++] Place vendored double-conversion library in a private namespace
4 participants