-
Notifications
You must be signed in to change notification settings - Fork 525
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
Pack localized assemblies. #1816
Conversation
paket ("pack -v output \"" + outPath) scenario |> ignore | ||
ZipFile.ExtractToDirectory(package, outPath) | ||
|
||
Path.Combine(outPath, "lib", "net45", "LocalizedLib.dll") |> checkFileExists |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use </> operator defined in Paket.IO (it is AutoOpen so you don't even have to open the namespace):
outPath </> "lib" </> "net45" </> "LocalizedLib.dll" |> checkFileExists
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While it looks sweet I have not seen it in the rest of the code so not sure. Trying to stay consistent with the codebase. Also as a noob Path.Combine(...)
is nice as I know what it does.
As always, thanks for taking the time to read!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's minor thing.
That same operator is defined in FAKE and pretty much any codebase dealing with paths so I thin it is not too far from reach for average F# developer.
You can use go to definition on operators also 😄
f45ed83
to
2c47583
Compare
Why do we show warnings and when? I mean having no satellite assemblies is the 95% case |
The warning is shown here, it happens when:
No localization should not give a warning. |
Fixes since previous attempt: - fsprojects#1810 should be ok now. - Outputting warning instead of throwing if satellite dll is not found. - Better pattern for finding languages. - Checking that matches for the regex is a culture name.
2c47583
to
f9508c6
Compare
open System.Collections.Generic | ||
open System.Globalization | ||
|
||
[<CompilationRepresentation (CompilationRepresentationFlags.ModuleSuffix)>] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless you have a type Cultures
under Paket
namespace, I don't think we need those attributes (which is used to disambiguate between module and type bearing same name).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copy pasted them from the Cache module, no idea what they mean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed for Cache module because there is also a Cache type under same namespace.
F# will coallesce both to expose them as Cache but the module need to be given that attribute which under the hood suffixes the static class with Module.
We don't need it for this Cultures since there is no Cultures type that would conflict.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation, removing it.
Oh, too late.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is always room for new PR ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was gonna try to fix the uri issue but was too slow :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That one is a bit tricky. not sure if my fix was good. have to think about it a bit more.
there is still one related test failing on mono: https://travis-ci.org/fsprojects/Paket/builds/145555619 |
Checking it out, didn't see that one before, strange. |
I assume there is something not commited |
|
Looks like the templates are missing, must have dumbed it during some rebase. Opening a new WIP PR for fixing it. |
Second attempt at #1806.
Thank you for all the help @smoothdeveloper!