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

Improved matching of paths with spaces for (Windows, macOS, Linux) #322

Merged
merged 2 commits into from
May 5, 2020

Conversation

FAlobaid
Copy link
Contributor

@FAlobaid FAlobaid commented Apr 16, 2020

This fix is related to JunoLab/Juno.jl#421 and improves on the previous PR #320 to better handle paths with spaces in Juno REPL for Windows, macOS and Linux. Among other things, it correctly handles extension-less filenames and newline. However, it doesn't fully match the following (so avoid):

1- If you start with a folder name with spaces (obviously). See example 1 in the avoid section.
2- If you have extension-less filename with spaces. See examples 2 and 3 in the avoid section.
3- If you have file extension with spaces. See examples 4 and 5 in the avoid section.

Related PR: JunoLab/atom-julia-client#734

Examples for Windows
win_jl

Examples for macOS / Linux:
nix_jl

This fix is related to JunoLab/Juno.jl#421 and improves on the previous PR JunoLab#320 to better handle paths with spaces in Juno REPL for Windows, macOS and Linux.
@codecov
Copy link

codecov bot commented Apr 16, 2020

Codecov Report

Merging #322 into master will increase coverage by 1.95%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #322      +/-   ##
==========================================
+ Coverage   54.95%   56.90%   +1.95%     
==========================================
  Files          42       42              
  Lines        2615     2504     -111     
==========================================
- Hits         1437     1425      -12     
+ Misses       1178     1079      -99     
Flag Coverage Δ
#unittests 56.90% <ø> (+1.95%) ⬆️
Impacted Files Coverage Δ
src/path_matching.jl 84.61% <ø> (ø)
src/misc.jl 16.66% <0.00%> (-11.91%) ⬇️
src/completions.jl 74.28% <0.00%> (-2.51%) ⬇️
src/frontend.jl 0.00% <0.00%> (ø)
src/formatter.jl 0.00% <0.00%> (ø)
src/debugger/repl.jl 0.00% <0.00%> (ø)
src/display/webio.jl 0.00% <0.00%> (ø)
src/debugger/datatip.jl 0.00% <0.00%> (ø)
src/display/frontend.jl 0.00% <0.00%> (ø)
src/profiler/traceur.jl 0.00% <0.00%> (ø)
... and 22 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3b0fe4f...40f5c60. Read the comment docs.

@aviatesk
Copy link
Member

aviatesk commented May 4, 2020

Would you mind adding (more) test cases you posted on JunoLab/atom-julia-client#734 (comment) ?

Added new test cases for path handling in Win / macOS / Linux.
@FAlobaid
Copy link
Contributor Author

FAlobaid commented May 4, 2020

Would you mind adding (more) test cases you posted on JunoLab/atom-julia-client#734 (comment) ?

Done. Added many test cases for Win and macOS / Linux.

@aviatesk
Copy link
Member

aviatesk commented May 4, 2020

nice, great work ! CI failures on nightly is unrelated to this PR (it happens on other repositories as well) so ignore that.
I will review on both PRs later.

@FAlobaid FAlobaid closed this May 4, 2020
@FAlobaid FAlobaid reopened this May 4, 2020
test/utils.jl Show resolved Hide resolved
@pfitzseb pfitzseb merged commit 2b34688 into JunoLab:master May 5, 2020
@FAlobaid FAlobaid deleted the fix-paths-matching branch May 5, 2020 16:18
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.

3 participants