Repository navigation
[WIP] Use Microsoft/VisualStudio-SharedProject as subtree - #733
enricosada wants to merge 2 commits into
Conversation
|
Hey @mousetraps, look at this, we're getting your project system :-) @enricosada Thanks for taking care of this mate. Kevin |
|
please don't submodule things. |
|
@forki why? Alternative ideas? |
|
Gitsubmodules sound awesome in the beginning, but in practice they are really really hard to handle. In our teams we found that even experienced git users run into big trouble from time to time. Newbies were completely lost. It requires really deep knowledge into the tooling. To make things more fun we had the issue that two submodules changed their url, so that we basically broke our complete history and had to git rewrite it. I guess these issues can be addressed with git subtree, but I didn't use it in practice. Tbh I'd prefer to inline the code here and merge manually back and forth. This doesn't sound half the fun, but it's a process everyone understands. |
|
Really thx for feedback @forki Inviato da Outlook On Thu, Nov 19, 2015 at 11:39 PM -0800, "Steffen Forkmann" [email protected] wrote: Gitsubmodules sound awesome in the beginning, but in practice they are really really hard to handle. In our teams we found that even experienced git users run into big trouble from time to time. Newbies were completely lost. It requires really deep knowledge into the tooling. To make things more fun we had the issue that two submodules changed their url, so that we basically broke our complete history and had to git rewrite it. I guess these issues can be addressed with git subtree, but I didn't use it in practice. Tbh I'd prefer to inline the code here and merge manually back and forth. This doesn't sound half the fun, but it's a process everyone understands. Reply to this email directly or view it on GitHub: |
|
yes, submodules need some special care and are not transparent to contributors (who need to understand how submodule works). But as @forki said, submodule need special care, require learning, there are some traps and maybe are not worth the effort here. i'll push force an update with subtree instead of submodule |
|
working on it, but i get the crlr issue ( .gitattributes ). |
|
sent pr Microsoft/VisualStudio-SharedProject#21 i'd like to add subtree after the line ending normalization if possible |
|
ok, @mousetraps merged normalization of encoding, i'll update this pr next week. |
|
@enricosada I don't quite get this PR and suspect it's not the right way to start things w.r.t.the project system. In particular it doesn't feel right to incorporate code we are not yet using as a submodule. I can see potential for bringing the updates and fixes across bit by bit, though we would best determine a common baseline which could be hard. Maybe we could even completely reconciling the two project system implementations. But such work seems long term and is worthy of a full feature branch or PR? Until we're sure it will work out I'm not sure using the submodule is right. |
|
Btw an alternative to sub modules is subtrees, which only places the additional process burden on contributing back to SharedProject, not on external contributors. This is what we use in both NTVS and PTVS. I'm on my phone now but I can share some of the original reasoning behind this decision when I have the chance to dig through emails. |
To be clearer, this seems like a valuable goal, or at least a good thing to investigate. The Visual Studio team may decide to pursue CPS or some other project system - it's not clear what the right evolution is - but experimenting with the above seems valuable input. It's just that a whole PR that does the job would be needed. Equally closing this one may discourage, which is not at all intended. |
|
@mousetraps yes, we are doing it with subtree instead of submodule, other people like @forki said it's easier. Thx for feedback btw, and for the shared proj code!! great initiative |
|
@dsyme the vs ide extensions is the component with the least improvements, and no roadmap.
Port every single bugfix one at time it's really complex, and no big gains. And we are in the same situation next bug. I tried with "open directory", complex and not really usefull. I really think the real long term solution is converge to sharedproj source code, because the code is really similar ( visualfsharp it's the same codebase, but older ) but better quality (bugfix, features, style) My possible workflow it's explained in #496 (comment) |
|
@enricosada Just to close this out - I'm totally fine with code alignment with Microsoft/VisualStudio-SharedProject. But please not via git subtree... There's no intrinsic reason why we need to use subtree to do this is there? |
|
@dsyme a subtree is not a submodule. The pro is: easier to merge new changes from sharedprj, and contribute back to sharedproj. Let me show it, i'll push it to this branch, so you can review. If not ok, i'll commit files only without |
|
added |
…0ecd6e git-subtree-dir: external/VisualStudio-SharedProject git-subtree-split: 70ecd6e27b3eeac0e2c1c39aa1476cf91df0abe1
…VisualStudio-SharedProject'
a5e94f0 to
d9430a6
Compare
|
ok, @dsyme it's pretty much the same as copy the source inside to pull new version from the diff:
another good is in or maybe it's not a solution, obv need work, but i think if we can import this codebase, lots of bugs can be fixed. We can start to minimize diff with style pr only, after that, we can discuss how to proceed in multiple iterations. it's ready for me this pr |
|
@enricosada I'm not sure I understand. We can't commit 649 files into the tree without them actually being actively used and part of the product. Why would we add files that aren't part of what's built? You don't need to have the files in the master branch just to compare the source code, or work on rebuilding the project system on SPS. For example, if the feature work is never completed then we would be left with 649 legacy files which need to be deleted. I'm OK with PRs that textually align the source code of FSharp.LanguageService.Base and FSharp.ProjectSystem.Base so that we can see what's what. But we would only checkin a subtree or a copy of SPS as part of the completed, tested feature. |
|
@dsyme i want a shared branch to do this work because i'd like to have some help. We can do that in another branch, but i'd like to have in
But as you wish, if for you @dsyme and @KevinRansom it's ok we can do that in another branch in this repo (more visible for contributors). |
|
@enricosada Thanks, I do think all those points above are valid, though they are in many ways in the nature of the beast.
If it helps, the Microsoft model is that "main" is always intended to be in a ship-ready state, at least up to an intended alpha/beta/release-candidate quality. Work-in-progress doesn't get integrated into "main". I think it's always been clear that commits to "master" in this repo have to be feature-complete and as bug-free as possible. If we have 5 major features going on we can't all do that in master, or even in this repo. And many of the same risks apply if the work is done in master too, e.g. all feature work runs the risk of dying, and integration is still necessary every time you pull from master,
Right now we're effectively giving feature work visibility via WIP PRs and feature branches. That's OK up to a certain level (but is admittedly badly affected by GitHub's size restrictions on showing diffs). Perhaps you could use that approach? The natural thing would be to do this as a branch in your own repo or as a surrogate repo. Then you can pull PRs and recruit people to commit to that.. You could then submit a WIP PR showing the status of the work and to give it visibility - the PR could advertise how to commit to the feature. (I'd actually appreciate it if there were an active WIP PR for the Thanks |
|
@dsyme diff of coreclr changes? you can diff branches (or commits) in github. coreclr as wip pull request can be ok (a pr is a branch, so not much different) because codebase doesnt change a lot, but i cannot do it, with a diff with 500file added, it's useless. I need a base somewhere (with sharedprj) and additional work as diff. I dont want to use a personal branch and develop there with pr, because no one it's gonna review it. That mean i am going to send a too big pull request and a big review (no thx, it's useless). So i think is ok to diff locally the sharedprj and visualfsharp (so no need for this pr or import sharedproj codebase now) and send multiple pr to refactor. I'll close this pr, and start send small refactor pr. Thx don for discussion, i know i tried to push a lot 😄 |
why do that? ref #496 ( fix folders, new interactive windows, show all files, drop and drop working, etc )
the Microsoft/VisualStudio-SharedProject repo contains the common code of Python Tools for Visual Studio and Node.js Tools for Visual Studio, .
Is the same codebase as visualfsharp, derived from MPF - Managed Package Framework for Projects, but a later version with a really solid implementation of the project system (for example folders are supported)
this is not the new CPS - Visual Studio Project System, i dont know how difficult is going to be convert to the new CPS, but i think is good to have the same codebase and roadmap when PTVS and nodejs move to CPS.
It's also possibile to support old vsprj system and new CPS in parallel (like c#, see CPS docs ) to make easier the migration.
I added the sharedproj as a submodule inside
external/VisualStudio-SharedProject.Why submodule:
The idea is to replace the current code inside
vsintegration/src/vs/FsPkgs/FSharp.Project/Common.Source.CSharp/Projectwith the code inside the submoduleexternal\VisualStudio-SharedProject\Product\SharedProject(modulo bugfix of visualfsharp, who can be sent as pr to the shared repo)A possible roadmap:
we can also use a temporary fork of the sharedrepo, to make the migration easier and incremental
Continue to fix bugs already fixed in another similar codebase waste lot of time ( see #732 for example, or lots of vs extensions bugs ) and there is little contribution, with mixed results ( it's 2015, folders or showallfiles doesn't works ). Now the priority is coreclr, but the vs area need some love too.