-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Pull required references from referenced projects. #30608
Comments
Not having references be transitive was an intentional design decision when we wrote project references - the idea being that if an intermediary layer intended to be an opaque wrapper over an upstream project, that should be possible. That said, I think it's reasonable to consider an opt-in per-reference setting to pull in its (recursive?) dependencies. |
I think there's another problem here because I have the same error but want a different outcome: Based on how I had expected typescript's tsconfig's Instead the Server is trying to build Client files and is complaining that Client and includes dom and Server doesn't - and I need server intellisense to not autocomplete for dom. So my Client project has been carefully set up so that the generated d.ts that the server actually includes do not have any references to dom structures. I don't know if this problem is because I'm outputting I am using path aliases between my projects with the I'm doing this because I want to use the types of function's arguments on the Client to help automatically type check the contents of network messages - these files are not actually used aside from intellisense and intellisense is working fine (VS2017). Edit: I said intellisense works - but I have to do a build or close and reopen visual studio for prerequisite project's changes to be propagated to dependant projects (even though |
@RyanCavanaugh After some thought I also agree. Not sure what I was thinking back then, but of course when developing in other languages, like C#, you don't inherit the types of dependent libraries. In fact, I'm using this recently to allow wrapping a common I think I also had issues recursively compiling all nested project references, but the |
This came up in discussion of #56436. The idea seems straightforward enough -- here,
The naming/semantics are a little unclear, though - if you have
Does |
Add in another scenario: if |
I have a proposal here to use word |
Search Terms
Inherit references from referenced project.
Pull required references from referenced projects.
Suggestion
I have projects that have references to other projects, but one other project has references to another project it is dependent on. That seems to be completely ignored, and is causing compiler errors. It forces me to have to know all the references of the referenced projects and pull those also, which I should not have to do.
Use Cases
This is pretty obvious. In a typical C# project in Visual Studio (for example), referencing a project resolves other references from that referenced project, and so on. It is not good practice to force projects to pull direct dependencies that are referenced indirectly by 3rd parties.
Examples
tsconfig.json
3rdPartyProject/tsconfig.json
This setup only outputs
3rdPartyProjectFile.d.ts
, as required by the first referenced projects. Intellisense fails, however, because the references in3rdPartyProject/tsconfig.json
are not included, thusAnother3rdPartyProjectFile.d.ts
is missing. This forces me to open all related tsconfig references and pollute my project json with them. This also may not scale well.Checklist
My suggestion meets these guidelines:
The text was updated successfully, but these errors were encountered: