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

Add C FFI for LocaleCanonicalizer #772

Merged
merged 4 commits into from
Jun 10, 2021
Merged

Conversation

dminor
Copy link
Contributor

@dminor dminor commented Jun 8, 2021

Fix for #756.

@dminor dminor requested a review from Manishearth June 8, 2021 14:05
@dminor dminor requested a review from a team as a code owner June 8, 2021 14:05
@coveralls
Copy link

coveralls commented Jun 8, 2021

Pull Request Test Coverage Report for Build c990bac47a61538c841b0167033a085255750a01-PR-772

  • 0 of 23 (0.0%) changed or added relevant lines in 2 files are covered.
  • 114 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.5%) to 75.652%

Changes Missing Coverage Covered Lines Changed/Added Lines %
components/locale_canonicalizer/src/locale_canonicalizer.rs 0 4 0.0%
ffi/capi/src/locale_canonicalizer.rs 0 19 0.0%
Files with Coverage Reduction New Missed Lines %
components/locale_canonicalizer/src/locale_canonicalizer.rs 50 76.3%
experimental/segmenter/src/line_breaker.rs 64 82.39%
Totals Coverage Status
Change from base Build da5bfbfdfa8dc7946530ec3ec97b365e1ab627c7: -0.5%
Covered Lines: 9374
Relevant Lines: 12391

💛 - Coveralls

zbraniecki
zbraniecki previously approved these changes Jun 8, 2021
Copy link
Member

@zbraniecki zbraniecki left a comment

Choose a reason for hiding this comment

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

comment (nb): reading this I realized that we hide the reasons constructor fails in C API. I hope we'll improve it one day since constructor failures are likely going to be most common in production environments.

Manishearth
Manishearth previously approved these changes Jun 8, 2021
Copy link
Member

@Manishearth Manishearth left a comment

Choose a reason for hiding this comment

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

looks pretty straightforward, glad it worked out to be mostly along the lines of the existing FFI!

return 1;
}
// expect "zh-TW"
printf("Output is %s\n", output);
Copy link
Member

Choose a reason for hiding this comment

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

issue: we should probably actually test that this matches expectations

(make sure the locale test is being run in Makefile.toml, btw, it's not at the moment)

@sffc
Copy link
Member

sffc commented Jun 8, 2021

comment (nb): reading this I realized that we hide the reasons constructor fails in C API. I hope we'll improve it one day since constructor failures are likely going to be most common in production environments.

Tracking issue, last discussed 2021-05-20 and assigned to @Manishearth for 0.4: #703

@dminor dminor dismissed stale reviews from Manishearth and zbraniecki via befa6ea June 9, 2021 12:27
Manishearth
Manishearth previously approved these changes Jun 9, 2021
@dminor dminor merged commit acf3886 into unicode-org:main Jun 10, 2021
@dminor dminor deleted the issue-756 branch June 10, 2021 17:31
@dminor dminor linked an issue Jun 11, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add C FFI for LocaleCanonicalizer
5 participants