-
Notifications
You must be signed in to change notification settings - Fork 6
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
automatic peco install on julia>=1.3 #10
base: master
Are you sure you want to change the base?
Conversation
Thanks for the PR. BTW, I'm OK with dropping julia 0.7 if that's the blocker. |
It's not the 0.7 but my current usage of For that we need a new |
Codecov Report
@@ Coverage Diff @@
## master #10 +/- ##
=======================================
+ Coverage 73.42% 74% +0.57%
=======================================
Files 4 4
Lines 350 350
=======================================
+ Hits 257 259 +2
+ Misses 93 91 -2
Continue to review full report at Codecov.
|
b423019
to
316cef3
Compare
Now it might be ready to go, but I found that the visual history of what's been written previously just vanishes after the query. EDIT: Fixed tests |
After force pushing like 5 times, I MIGHT managed to fix everything. Who expects that tests are written with EDIT: |
Now 0.7 results in unsatisfiable constraints because peco_jll has constrained julia to be >=1. So maybe we should drop it now. But tbh why would anyone stay on 0.7? |
Btw why there are no CI jobs for JL 1.2 and 1.3? (And soon 1.4) |
Did you see #6 (comment)? What do you think about implementing Option 2 here?
Sounds good. Please bump the minor version of InteractiveCodeSearch.jl in
Good catch. I forgot to add them. Let's add them here as 1.3 is necessary for |
abstract type SearchPolicy end | ||
struct Shallow <: SearchPolicy end | ||
struct Recursive <: SearchPolicy end | ||
|
||
|
||
mutable struct SearchConfig # CONFIG | ||
open | ||
interactive_matcher::Cmd | ||
interactive_matcher::Function |
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 breaks backward-compatibility. Let's still support
CONFIG.interactive_matcher =
and just remove ::Cmd
. The idea is to use run-time dispatch: #6 (comment)
setmatcher!(convertCmd(cmd), obj) | ||
end | ||
|
||
function convertCmd(cmd) |
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.
Please use snake_case.
Co-Authored-By: Takafumi Arakaki <takafumi.a@gmail.com>
I didn't see it. Regarding |
I think it's a totally valid style as long as it is documented (i.e., a public API). See, e.g., DataFrames.jl and Tables.jl. Also, this
OK, full disclosure, these are all initially added by me. But I didn't have major backlash so I'm assuming that it's a valid interface. |
So what do you think about the get/setproperty function? |
Do you mean to do the conversion via CONFIG.interactive_matcher = value
@assert CONFIG.interactive_matcher == value It's OK to break it sometimes (especially in the class-based OOP) but I'd like to avoid it if possible.
That's a fair point but I only document it for setting things. Also, overloading |
Either way will be breaking, so how about doing a fair cleanup (and bumping the major version)? Aka condensing the code we need and adding an explicit interface via methods |
As I said, I don't think
|
While it's true that |
Unfortunately, it doesn't. In Julia, every type is potentially callable. So, for hypothetical API |
This was the shortest change I had been able to come up with.
It now downloads in any case but uses the systems peco if available. (Otherwise it uses the artifact)
Fixes #6 for Julia>=1.3
Edit: I even managed to increase coverage 🤣
EDIT2: Seems to be far from idiomatic usage of the new artifacts & jll. Thus, do not merge yet! Eventually this needs a bigger rewrite.