-
Notifications
You must be signed in to change notification settings - Fork 1
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
Packages for language support #3
Comments
I agree 100%. I haven't worried about it because I'm currently worrying about failure and not success :) I'm thinking, just as you, that p itself should contain just the bare minimum needed to install the next thing it needs and then the next and so on. Project type detection for officially supported project types and a way to download the full support seems like it can still be pretty small. Plus all the functionality for the command dispatch and config file parsing of course. |
I think packages could just be a json or yaml file even. |
run:"/bin/python"
test:"/bin/python -m pytest $@"
... Only an example, but this could perhaps |
True. I already support .ini files that could take the place of all those files. I did it this way to test out how it'll work if one calls out to subprocesses in several layers. I want both, to make sure I can cover all use cases and make it easy for people to add their stuff in the way they feel most comfortable with. |
What format do you want to use for the packages? |
I think we start with .ini files. This test shows the basics: https://github.com/boxed/p/blob/master/tests/test_p.py#L73 It will most certainly not cover all cases, and maybe especially not how to install the entire infrastructure of a language to a specific OS, but we need to get to a Minimum Viable Product that is useful to many people first. We can make big changes later. |
Do you know any benchmarks for parsing of .ini, .yaml, .json ? |
No. But I think we're a long way from that being very relevant. We have to make it work first! That is, make it actually work for enough languages/project types to be useful enough. |
Yes, but I think language packages should be part of the MVP |
Depends on one's definition for sure. I already use p for my work so it's usable for some cases already. |
Just one idea:
Then we add these packages' path to a .pconfig file, like this:
.p
├── python
└── swift And if you then type: $ p python install CLI-csdummi p looks at the directories in ConclusionWith this it would be very easy to maintain a language support package |
It certainly has benefits. It's easier to remove a package for example. The problem is that you can't as easily add/override commands. |
What do you mean? |
That's not great. You shouldn't put the package manager stuff in the same bucket as everything else, because then you lose your own customization when you delete that folder (aka uninstall a package). It also means we can't upgrade the package, because it's a mix of what we had and what the user had. It also means you can't shadow things meaningfully. |
What is everything else? |
I'm unable to understand your concerns, what is impossible or harder to do with this structure? |
It's much nicer if you can have customizations in your home directory or with your dot files. |
Where do you think should we then put the packages, |
And many Applications do that already, look at your home folder, |
I think looking at the system path and the current directory first, then it could look in directories like you suggest. It increases complexity a bit but might be worth it. |
But, that means their might be confusion, for example: |
If you can put p language packages everywhere, will that will lead to confusion |
Well no, that's not it. If there is a binary called |
But what happens, if the user forgets to delete one such overriding binary and writes another one, |
And this concept also introduces a vulnerability, of sorts. |
Sure. But no one seems to care for git. I don't think it's cause for concern. |
Can you override git commands? |
I think that we can do this, though I don't know how many users would use this feature. |
Oh, and we should print the location of command-binaries, if it isn't located in the default location |
We could reserve "p which" to display where all commands come from. Including from ini-files etc. |
No, that wouldn't be enough, people wouldn't execute They need to be prompted by that every time, Or, to propose another solution:
Not trusted would be the default |
I just disagree with everything there. I'm talking about a debug command to help people figure out what p is doing. This is useful when it does something unexpected. Prompting every time would make the entire project of p totally worthless and void. |
I think we are just not yet there, we have to develop p and the support for packages.
|
I think packages like you suggest is a nice idea. But they should be in addition to what already exists. So p should first try to find a binary p-python-foo and then if that doesn't exist take As for the language, I think it's better to stick with python3 until we're ok with the features and usability. |
Alright, I agree. |
As it seems to be today, you add support to every language for p
to this main repository.
These are the files to provide support for specific languages:
What is this supposed to be in a few years, if you added support for
only a fraction of these languages?
And if download p then, do I have to download support for all these
languages as well?
Although I will only use two or three of them at a time?
This approach can't work in such a scenario!
I think we should thus think about a more modular approach
to installing support for new languages.
For example:
Let's say that we develop a standard for
how to implement support for a language.
Then we create a package type (such
as wheel for python), and a tool,
or a command p, that creates this package
from a folder and uploads it to a server.
Then everybody can just download this
package file and incorporate it into their
version of p.
What do you think?
Should we develop such a standard package
for language support?
The text was updated successfully, but these errors were encountered: