-
Notifications
You must be signed in to change notification settings - Fork 294
[WIP] Add Service Dependency Hints / Metadata #387
[WIP] Add Service Dependency Hints / Metadata #387
Conversation
Are you proposing adding new top-level keys to the package.json? Could we just express autocomplete-plus {
"name": "autocomplete-plus",
"consumedServices": {
"autocomplete.provider": {
"required": false,
"versions": {
"2.0.0": "consumeProvider"
}
}
}
} autocomplete-css {
"name": "autocomplete-css",
"providedServices": {
"autocomplete.provider": {
"required": true,
"versions": {
"2.0.0": "getProvider"
}
}
}
} We could also call these |
Yep, that was the direction I was heading. I was also going to add a hint for a preferred or hinted package that satisfies the service dependency (i.e. it provides/consumes the service) that would be used if:
This would allow us to have the following user flows:
|
So far this is my preferred syntax for these concepts. autocomplete-plus {
"name": "autocomplete-plus",
"consumedServices": {
"autocomplete.provider": {
"requireProvider": true,
"suggestedProviders": {},
"versions": {
"2.0.0": "consumeProvider"
}
}
}
} autocomplete-css {
"name": "autocomplete-css",
"providedServices": {
"autocomplete.provider": {
"requireConsumer": true,
"suggestedConsumers": {
"autocomplete-plus": "^1.0.0"
},
"versions": {
"2.0.0": "getProvider"
}
}
}
} The |
👍 |
I still think we could leave out the |
bump To get the discussion moving again on this. I would absolutely love to stop having to force users to install |
Although some of the arguments from #385 (comment) can be applied here, not all of them do so I'm wondering if that is why this was closed? They are very different cases in my opinion, #385 was a way to install a group of packages at once, which might be useful for a user but doesn't really relate to this which was more along the lines of "I simply can't operate without something providing/consuming this service". I still would love to get rid of the workaround of forcing a hardcoded list of packages to be installed using |
@Arcanemagus this is a good point, but I think apm is the wrong place to start solving the problem. I think this begins with a complete understanding of the desired user experience, from which we should work backwards to potentially add metadata to package.json and / or the atom.io API. I completely agree that the scenario you describe is a big gap and leaves users with an undesirable outcome some (not-insignificant) portion of the time. |
A lack of service suggestions is definitely on my radar as a huge shortcoming in our package system. |
Just a bump that this feature would have solved a major headache with the upcoming launch of As of now we are thinking of adding versioning support into |
Hear you loud and clear. It's on a pretty short list of things competing for my attention and I'm hoping another team member that's switching from another team within GitHub might help us make progress here fairly soon. /cc @iolsen |
With the beta release of Sure, that check can be removed once (if?) Any chance this could be worked on soon™️ or should I just be telling users "tough luck" until that check can be completely removed? |
Could always refer users to the Consumers section at the top of the AtomLinter home page and let them choose their own consumer. 🤷♂️ |
Oh sure. That's an improvement. User comes to us for a service. We can't provide it without a consumer. So let's just send them away to a web browser, to a page full of choices, and no obvious hint as to which choice might be a good one or why. "Not my problem. Good luck to you." 🤦♂️ |
🚨 WIP - Proposal, Do Not Merge Yet 🚨
After discussions with @nathansobo, @maxbrunsfeld, @bolinfest, this PR will allow packages to express the
need
for packages or thedesire
for packages that provide or consume a service with a specific service name.Goals
Allow packages to specify:
x
for me to function at all. E.g. "I amautocomplete-snippets
. If there is no package installed that consumes theautocomplete
service, I cannot function".x
but my package can function without it. E.g. "I amgo-plus
. If there is no package installed that consumes theautocomplete
service, I just won't provide autocomplete suggestions from gocode".x
for me to function at all. E.g. "I amlinter-superawesome
. If there is no package installed that provides thelinter-helpers
service, I cannot function".x
but my package can function without it. E.g. "I amautocomplete-plus
. If there is no package installed that provides theautocomplete
service, I can function just fine because i have SymbolProvider built-in".autocomplete-hack
, and I know thatautocomplete-plus
provides theautocomplete
service."Non-Goals
PackageManager
)/cc @kevinsawicki @thedaniel @benogle @jlord
This was formerly part of #385.
🚨 WIP - Proposal, Do Not Merge Yet 🚨