Skip to content
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

fix(core): add cargo and gradle to external graph node type #29610

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xiongemi
Copy link
Collaborator

Current Behavior

Expected Behavior

Related Issue(s)

Fixes #

@xiongemi xiongemi requested review from a team as code owners January 13, 2025 23:14
Copy link

vercel bot commented Jan 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nx-dev ❌ Failed (Inspect) Jan 17, 2025 10:24pm

Copy link

nx-cloud bot commented Jan 13, 2025

View your CI Pipeline Execution ↗ for commit 7591790.

Command Status Duration Result
nx documentation --no-dte ❌ Failed 1m 6s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-17 22:25:10 UTC

@@ -14,8 +14,8 @@ while allowing tracking of the full tree of different nested versions
### Properties

- [data](../../devkit/documents/ProjectGraphExternalNode#data): Object
- [name](../../devkit/documents/ProjectGraphExternalNode#name): `npm:${string}`
- [type](../../devkit/documents/ProjectGraphExternalNode#type): "npm"
- [name](../../devkit/documents/ProjectGraphExternalNode#name): `npm:${string}` | `cargo:${string}` | `gradle:${string}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imho this should just be string, nx-dotnet would likely add a new one, nxlv/poetry would add a new one etc.

@@ -114,15 +120,21 @@ export interface ProjectGraphProjectNode {
*
*/
export interface ProjectGraphExternalNode {
type: 'npm';
name: `npm:${string}`;
type: 'npm' | 'cargo' | 'gradle';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the name just being a string, nx-dotnet would add external nodes that had type nuget or similar so this should also probably just be a string.

export function isProjectGraphExternalNode(
node: ProjectGraphProjectNode | ProjectGraphExternalNode
): node is ProjectGraphExternalNode {
return node.type === 'npm' || node.type === 'cargo' || node.type === 'gradle';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If node.type is just a string to support things like nuget and pip, this check should probably be checking that the node is not a library, app, or e2e instead of a whitelist of external node types.

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

Successfully merging this pull request may close these issues.

2 participants