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

Access to dependency versions at runtime #35

Open
ii14 opened this issue Mar 29, 2022 · 2 comments
Open

Access to dependency versions at runtime #35

ii14 opened this issue Mar 29, 2022 · 2 comments

Comments

@ii14
Copy link
Member

ii14 commented Mar 29, 2022

Maybe plugins should have some standard way of accessing versions of their dependencies to handle differences in API and behavior between versions?

Example:

packspec["telescope"].version
-- returns a string, eg. "1.2.3"

if packspec["telescope"].is("~> 2.0") then -- format reused from "version" field in the spec
  -- ...
else
  -- ...
end
@mjlbach
Copy link
Contributor

mjlbach commented Mar 29, 2022

I think this is a duplicate of #3

@ii14
Copy link
Member Author

ii14 commented Mar 29, 2022

Not quite, I think the idea there was to have multiple versions of the same plugin at the same time. This is about plugins being able to check the version of their dependencies. I guess this could be a different approach to that problem.

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

No branches or pull requests

2 participants