Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

Consider removing IApplicationEnvironment \ IRuntimeEnvironment #36

Closed
pranavkm opened this issue Apr 22, 2016 · 13 comments
Closed

Consider removing IApplicationEnvironment \ IRuntimeEnvironment #36

pranavkm opened this issue Apr 22, 2016 · 13 comments
Assignees
Milestone

Comments

@pranavkm
Copy link
Contributor

  • Runtime components in Asp.Net have switched to using IHostingEnvironment over IApplicationEnvironment.
  • CoreFX has a RuntimeInformation type that has most of the API that IRuntimeEnvironment supports.

Given these, we could remove these types from our codebase. We can follow up with a change to the CLI so that it removes one arc of the cyclic dependency that is currently present between the two.

cc @davidfowl \ @Eilon

@pranavkm
Copy link
Contributor Author

Related to #34

@natemcmaster
Copy link
Contributor

Is this also going into RC2?

@analogrelay
Copy link
Contributor

Is the goal here to remove the interfaces, or the implementations as well? We are definitely using the implementations in a number of places (and RuntimeInformation is not sufficient to cover those)

@pranavkm
Copy link
Contributor Author

@anurse - the implementations will stay. Here's the PR for it #39

@analogrelay
Copy link
Contributor

Yeah, I saw the PR and it looked OK. I was just concerned there was going to be a part 2 that removed the implementations :P

@pranavkm
Copy link
Contributor Author

The hope was to move the RID inference code into Cli and switch to using RuntimeInformation in our code. Part of a set of changes to unbreak cycles between CLI and our repos.

@Eilon
Copy link
Member

Eilon commented May 3, 2016

@pranavkm any further work for this?

@pranavkm
Copy link
Contributor Author

pranavkm commented May 3, 2016

Needs to be checked in. Waiting for the new CLI to do this.

@Eilon
Copy link
Member

Eilon commented May 3, 2016

Ah ok!

@pranavkm pranavkm closed this as completed May 3, 2016
@pranavkm pranavkm reopened this May 3, 2016
@pranavkm
Copy link
Contributor Author

pranavkm commented May 3, 2016

Fixed in 95d352a

@Eilon
Copy link
Member

Eilon commented May 5, 2016

Done/Closed/Open?

@pranavkm pranavkm closed this as completed May 5, 2016
@DavidArno
Copy link

Can anyone explain the logic behind removing these interfaces? This has just made testing harder for no logical reason that I can see.

@pranavkm
Copy link
Contributor Author

@DavidArno - we no longer use these interfaces in our codebases. In the past, DNX owned creating \ populating \ injecting these interfaces. However since the move to CLI, these are primarily wrappers for System.Runtime.InteropServices.RuntimeInformation and AppContext.BaseDirectory \ AppDomain.BaseDirectory. We didn't find it necessary to continue maintaining abstractions for wrappers.

We do have an IHostingEnvironment interface which has abstractions for web related things such as content root and web root which is what all our middlewares use.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants