-
-
Notifications
You must be signed in to change notification settings - Fork 62
feat: native windows provider #436
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
Open
Kneemund
wants to merge
15
commits into
rrthomas:main
Choose a base branch
from
Kneemund:feature/win8-provider
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+369
−4
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Owner
|
This is amazing to have, many thanks! I must apologise that you've caught me at a moment where I'm unable to be likely to look at it in a matter of days, and possibly not weeks, so do ping me if you don't hear for a while, but rest assured it is something I really want to land. Thanks in particular for taking care with the build system and checking the situation with the tests and CI. |
26f76e6 to
4c1b409
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a provider for the native spellchecking added in Windows 8. Deleting words from the session (optionally) requires at least Windows 10. Closes #52.
I spent quite some time fighting the build system. The squashed changes seem idiomatic to me. I'd appreciate some feedback on that ;)
I've also made all providers use their own
<NAME>_LIBSvariable instead of appending to the globalLIBS. I think that was intended at some point, but never actually done, since most of these variables were already in-place in the provider Makefile.CI
apt-get updatewasn't being ran prior to installing packages. This PR fixes that (see 6eb467f), even though it's unrelated.FileStreaminputs are using the system locale encoding (which is the ANSI code-page on Windows, and UTF-8 on other systems). Now, the CLI first checks if the input is already valid UTF-8 before attempting that conversion (see ec553de).(I doubt that this conversion is necessary, but I guess we can keep it in case anyone depends on it.)
make distcheck(and notmake check). Either way, that's unrelated to this PR.Licensing
I'm by no means an expert at licenses, but here is the way that I see things. This should definitely be double-checked by someone other than me.
The new provider uses the
bcp47module from gnulib to convert between BCP47 language tags (which Windows uses) and XPG/POSIX language tags (which all other providers use). This module is licensed under LGPLv3+. The source code of the provider is licensed under MIT. That makes the whole provider derived work and thus also LGPLv3+.I think that enchant itself stays LGPLv2+, since the provider is loaded dynamically and not at all a core component.
In the process, I had to loosen the LGPL restriction of
gnulib_tool(see 4f9ac6b) so that it can include any LGPL licensed modules, not just LGPLv2 licensed ones. That means that we have to be more careful about the modules we use in the future. I don't know if we can somehow limit this to just the new provider. We would probably need an entirely separate build step.TODOs
win8sounds like it only works on Windows 8. Suggestions would be very welcome.