Bug 393102 - Move language stubs to separate repo
Summary: Move language stubs to separate repo
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PHP Core CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-29 17:51 EDT by Robert Gruendler CLA
Modified: 2020-05-14 10:17 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Gruendler CLA 2012-10-29 17:51:19 EDT
To make the language stubs 1. more reusable and 2. make it easier to contribute without checking out the complete PDT source, it would be good to move the language stubs from plugins/org.eclipse.pdt.core/Resources/language to a separate repository, and make it available on github.
Comment 1 Jacek Pospychala CLA 2012-10-31 06:26:12 EDT
I'm not quite sure how we can make this. Anything we want to distribute with PDT has to be in Eclipse git repo, has to pass the IP process.

There's room for a plugin that would e.g. consume API stubs from somewhere on internet...
Comment 2 Jacek Pospychala CLA 2012-10-31 06:27:07 EDT
I'll try to push our current contributions faster
Comment 3 Jacek Pospychala CLA 2012-11-22 05:53:45 EST
for the record, Robert pointed me at very cool project for generating PHP stubs: https://github.com/schmittjoh/php-stubs
Comment 4 Kaloyan Raev CLA 2016-08-03 05:42:06 EDT
From the Eclipse Process point of view we can do the following:

1. Move the stubs and the complementary tools (like generators) to a separate subproject under PDT, e.g. "Eclipse PHP Stubs" project.
2. Request the git repo for this new project to be hosted on GitHub [1].
3. Request to distribute the stubs under the Eclipse Distribution License [2], which is based on the New BSD License and is more permissive than EPL.

All this would make it easier to reuse the stubs outside of Eclipse and would bring more contributions.

[1] https://wiki.eclipse.org/Social_Coding/Hosting_a_Project_at_GitHub
[2] https://www.eclipse.org/org/documents/edl-v10.php
Comment 5 Dawid Pakula CLA 2016-08-03 05:47:53 EDT
+1 from me

On this project we could divide stubs to PHP version related and universal (mostly on pecl, for ex xdebug).
Comment 6 Michal Niewrzal CLA 2017-06-27 08:57:53 EDT
I think it would be nice to refresh this topic :) How we should start? By creating sub-project for PDT?
Comment 7 Dawid Pakula CLA 2017-06-27 09:43:48 EDT
I don't think sub-project is necessary for now. Separate plugin with stub utilities should be enough ;)
Comment 8 Michal Niewrzal CLA 2017-06-27 10:18:32 EDT
(In reply to Dawid Pakula from comment #7)
> I don't think sub-project is necessary for now. Separate plugin with stub
> utilities should be enough ;)

What do you mean separate plugin?
Comment 9 Dawid Pakula CLA 2017-06-27 10:23:28 EDT
current stub-utility is simple php script, hard to maintain. Keeping it outside "java" project should simplify life.
Comment 10 Michal Niewrzal CLA 2017-06-28 04:23:57 EDT
After short discussion with Kaloyan we concluded that it would be interesting to check another option instead of creating yet another php stubs project. PHPStorm has nice stubs [1] for CA and the license is Apache 2. It should be possible to use them with PDT. Stubs are already used by php-language-server. 


[1] https://github.com/JetBrains/phpstorm-stubs

WDYT?
Comment 11 Eclipse Genie CLA 2017-06-28 06:58:13 EDT
New Gerrit change created: https://git.eclipse.org/r/100200
Comment 12 Dawid Pakula CLA 2017-06-28 10:46:08 EDT
I like these stubs but:
1. Today we have stubs per php version. If we switch to "always-complete" stub version, we will need @since tag validator in near future.
2. CQ will be required after each update.
3. These stubs haven't constants like false / true / null .. so bug 480451 will be important.
4. We have to be sure that stubs are parsed always via latest parser.
Comment 13 Michal Niewrzal CLA 2017-06-28 11:54:39 EDT
(In reply to Dawid Pakula from comment #12)
> I like these stubs but:
> 1. Today we have stubs per php version. If we switch to "always-complete"
> stub version, we will need @since tag validator in near future.

If we decide to go in this direction it will take time before switch will be done and we won't switch until all parts will be ready.

> 2. CQ will be required after each update.

I think this will be most problematic because stubs have no versions and we will need to decide when update stubs (and create new CQ).

> 3. These stubs haven't constants like false / true / null .. so bug 480451
> will be important.

Like 1.

> 4. We have to be sure that stubs are parsed always via latest parser.

Like 1.
Comment 14 Michal Niewrzal CLA 2017-08-22 07:56:58 EDT
Now when I'm looking at @since validator I see that this can be a little bit problematic. Currently we don't have a place to store info about PHP version from @since tag and I think parsing this on demant won't be a good option. We can create modifier for every PHP version but I also not sure if it's a good idea.

A similar problem is with @deprecated tag. PDT needs to know about the version from tag to highlight (or not) code according to project's PHP version.
Comment 15 Dawid Pakula CLA 2018-01-27 09:31:45 EST
So I'll start from DLTK. We need ability to store additional information's for each IMember (maybe event IModelElement), this will allow to stop scanning AST each time when we need some additional informations from PHPDoc.

I thinking about IMember#properties to store key=value elements.
Comment 16 Michal Niewrzal CLA 2018-02-12 02:19:42 EST
(In reply to Dawid Pakula from comment #15)
> I thinking about IMember#properties to store key=value elements.

Sounds good. At least it will be flexible enough to use it with other features.