-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Move host components out of installer into a common location #49233
Comments
Tagging subscribers to this area: @dotnet/runtime-infrastructure Issue DetailsTo my knowledge the host components consist of the native source files, nuget packages, the managed HostModel library and tests. Most of these assets are located under src/installer as that's where they lived before repository consolidation (core-setup repo). I propose moving these components together to common place out of src/installer:
As the HostModel library isn't publicly shipping but maintains the contract with the host, it doesn't belong into libraries as that's where we ship public APIs from. Aside from that, the host tests require the HostModel library and the HostModel tests aren't unit tests but end-to-end tests which we currently don't have under src/libraries. I don't propose to change any of the subset names or the host dependencies (i.e. shared framework packs for testing). cc @agocke @vitek-karas @VSadov @jkotas
|
Any concerns with the proposal? If not I would start decoupling the components from the src/installer infrastructure and move bits by bits. |
The proposal sounds good to me. |
The native part has been moved recently to The rest looks reasonable, but I wonder how much will stay under src\installer |
The eventual goal is to remove src/installer and have the subfolders under src better match the subset category names (host, packs). |
Yes, that is what I thought. Once host and packs are out, I do not think there is something that belongs to "installer". |
Technically, we could keep the |
Absolutely. That's tracked via #49428.
That discussion probably belongs into #49426. I would be fine to keep it as-is (installers as part of packs) for simplicity.
We usually group sources in dotnet/runtime by component and less by language (i.e. src/libraries/*, coreclr, mono, tasks). The existing |
We do not have one unifying scheme how to group sources together. It is not unusual to see sources grouped by language -
I agree that it would not hurt, but I do not see it helping much either. |
Putting the first time contributor hat on I would say it's highly confusing that a "src/native" folder exists. It suggests that it contains the native source files of the repository even though it only contains a very limited set of it. Even though we might not be consistent today doesn't mean we shouldn't strive towards a consistent scheme.
The native folder under libraries actually made perfect sense as it was the home of all native code in CoreFx before repositories were consolidated. IMO it doesn't make much sense anymore in it's current form.
Absolutely agree on the necessity of shared source folders. The first two examples make perfect sense as their paths clearly indicate which component their shared sources belong. |
Agree. I think we may want to work towards gradually moving all native code from the whole repo under
What would make more sense in the current repo in your opinion? |
The reason I would think
Splitting these assets across top-level folders would be confusing IMO. If you wanted to have both |
With the single-file host, the separation between the various groups of native code has kind of blurred. |
We could in theory look at single-file host as just a packaging thing. It in itself actually introduces only a small amount of special code. For the most part it's just a different way how to package our assets. It's not that different from runtime installer, or runtime pack. I personally would also prefer organizing the code by the feature (host, runtime, libraries, ...) and not the language it's written in. |
If we already have the
I'm not exactly what you mean by that. Could you please elaborate? |
It is doable, but pain to maintain.
Right, that was my thinking. |
Another library I was able to do the mechanical work for it in commit 'Move HostModel under src/libraries' in: main...am11:feature/hostmodel-move, which is rebased on branch of PR #57036. The benefit, IMO, is that this approach makes 'host packages' very independent and we can then rename |
IMO it makes more sense to have everything host related under |
by just renaming OK. I was thinking it a little bit differently; we already reference src/installer/pkg in src/libraries so in a sense they are not decoupled anyway. Which is why I thought a library project with src+tests is best suited under libraries rather than one off exception (that seldom gets maintenance updates). |
No, I still believe that the proposal in the top post makes sense. The remaining part of src/installer which is the shared framework and the publishing logic is tracked by #49428. |
@ViktorHofer, it makes sense to me as well. 🙂 src/host
- Microsoft.NET.HostModel
- src/
- tests/
- packages
- Solution File (for opening inside VS) the prerequisites for |
Would we also move host tests from |
Yup, it will be either
It consists of HostModel's src, tests, packages and corehost (native). The native bits were moved to neutral place |
I would useful to write down the principle that we are going to use to decided whether a component or a feature area should get its own top-level directory. The host does not look that special to me. I think it would be better to make its tests fit into the existing test structures (either |
I agree that we need some clarity on this. Examples are
Wasn't the host since the incarnation of corefx, coreclr and core-setup special as it only lived in core-setup because of the lack of a better place? It sounds to me that it doesn't belong into libraries nor into the runtime folders. As we would like to remove the src/installer partition, host related sources need to move to a different location. As the host test end-to-end I don't think they belong either into the libraries tests or the runtime tests. |
I look at src/tests as the place for everything that is not a pure managed API, where the libraries test setup that is designed for testing pure managed APIs would not work well.
Yes, the host was special back then. I do not think it is as special in the merged repo. |
Related to top-level directories, I think src/workloads is also something that probably does not warrant a top-level directory for two project files. (could be under src/mono) |
@trylek - does your test consolidation work have any effect on any of the above discussion? At this point moving to 8.0.0 to avoid any stability issues so late in the cycle. |
@SamMonoRT - I think this discussion is mostly unrelated to the pending test consolidation which only deals with runtime (CoreCLR & Mono) tests, not hosting tests. |
To my knowledge the host components consist of the native source files, nuget packages, the managed HostModel library and tests. Most of these assets are located under src/installer as that's where they lived before repository consolidation (core-setup repo). I propose moving these components together to common place out of src/installer:
As the HostModel library isn't publicly shipping but maintains the contract with the host, it doesn't belong into libraries as that's where we ship public APIs from. Aside from that, the host tests require the HostModel library and the HostModel tests aren't unit tests but end-to-end tests which we currently don't have under src/libraries.
I don't propose to change any of the subset names or the host dependencies (i.e. shared framework packs for testing).
cc @agocke @vitek-karas @VSadov @jkotas
The text was updated successfully, but these errors were encountered: