-
Notifications
You must be signed in to change notification settings - Fork 7
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
Pulling in the magic strings from an online source #54
Conversation
Plenty of issues: - The current form creates some interesting problems with the generated string (control chars etc) - Need to migrate this to an SBT task, using SBT IO for reading/writing the strings file - Properly reference the strings file, removing it from resources
I'm okay with this approach. |
I don't think lazy is necessary - if anything that's going the opposite way to which I'd want to go (ideally I want the list parsed at compile time as this only ever needs to be done once). As for in the Jar, I assumed it would be as it's in the |
I've manually tested this and it works fine in a fresh project, pulling in the published Jar. I've created issue #55 to do the work to automate this. If you're happy can I get a LGTM and I'll merge this. Thanks! |
Should it be Scala 2.10 and 2.11 compatible? The method |
Ah yes, this is masked by the multiple build issues I was planning to fix after this. I'm going to mark this PR as blocked until I've fixed #52 |
Codecov Report
@@ Coverage Diff @@
## master #54 +/- ##
=========================================
- Coverage 98.34% 97.6% -0.75%
=========================================
Files 10 10
Lines 121 125 +4
Branches 4 4
=========================================
+ Hits 119 122 +3
- Misses 2 3 +1
Continue to review full report at Codecov.
|
@fedefernandez are you able to review now please? This is working across Scala 2.[10, 11, 12]. Thanks |
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.
LGTM!
This parses the data in the "big list of naughty strings" repo and provides a generator.
Originally I was trying to use a macro to parse the lines into a list, and I realised I didn't really need to do that :-/ ... I think the rationale behind that was to only have that list parsed once ever - at library compile time - but it wasn't really worth the effort when it can be done so simply when the Magic class is first referenced, I think this is a fine tradeoff.
@juanpedromoreno @fedefernandez what do you think?