-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Unable to remove dependencies between projects as specified in the docs via implicitDependencies
#8322
Comments
I believe function detectAndSetInvalidProjectValues(
map: Map<string, string[]>,
sourceName: string,
desiredProjectNames: string[],
validProjects: any
) {
const invalidProjects = desiredProjectNames.filter(
(projectName) => !validProjects[projectName.replace('!', '')]
);
if (invalidProjects.length > 0) {
map.set(sourceName, invalidProjects);
}
} with // ...
it('should throw for a project-level implicit dependency that is not valid', () => {
mockNxJson.implicitDependencies['nx.json'] = 'invalidproj';
try {
assertWorkspaceValidity(mockWorkspaceJson, mockNxJson);
fail('should not reach');
} catch (e) {
expect(e.message).toContain('nx.json is not configured properly');
expect(e.message).toContain('invalidproj');
}
});
it('should not throw for a project-level implicit dependency that is valid', () => {
mockNxJson.implicitDependencies['nx.json'] = 'lib1';
assertWorkspaceValidity(mockWorkspaceJson, mockNxJson);
});
it('should not throw for an exclude project-level implicit dependency that is valid', () => {
mockNxJson.implicitDependencies['nx.json'] = '!lib1';
assertWorkspaceValidity(mockWorkspaceJson, mockNxJson);
});
it('should throw for an exclude project-level implicit dependency that is not valid', () => {
mockNxJson.implicitDependencies['nx.json'] = '!invalidproj';
try {
assertWorkspaceValidity(mockWorkspaceJson, mockNxJson);
fail('should not reach');
} catch (e) {
expect(e.message).toContain('nx.json is not configured properly');
expect(e.message).toContain('invalidproj');
}
}); and remove the tests "should throw for a project-level implicit dependency that is a string" and "should throw for an invalid project-level implicit dependency" |
@vsavkin Please take a look. |
we are running into same issue. Ignore pattern doesn't work |
Is there any news on this? |
Ignore pattern doesn't work in latest v13
Also, this includes self Can someone help to understand why is it happening? |
I was having this issue, turns out I just spelled the project-name wrong : ( |
I'm not able to reproduce this on the latest Nx. Is anybody able to reproduce this on Nx |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. |
I am still facing this issue with nrwl/workspace version 15.2.4, even after excluding the dependency with implicitDependencies:['!meta'] syntax it still gives below mentioned error when lib is built. It looks like all of angular-ui's dependencies have not been built yet: |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. |
I tried with the latest version (15.4.1) and it works according to the documentation but only when used on |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. |
I'm getting this issue after migrating to |
Migrated to 15.7.2 and getting this issue |
This persists on 15.8.5 |
This issue persists on 15.8.9 |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
In https://nx.dev/l/r/core-concepts/configuration, it specified that we can remove dependencies between projects (e.g. a lib seems to build an app while it does not have a connection via the project graph, so I'd like to explicitly remove it)
When adding
"implicitDependencies": ["!mylib"]
project.json file of a lib, then trying to build it, I get:From what I can see, support for this functionality isn't anywhere in the relevant areas of nx.
Expected Behavior
Should build the library without building
mylib
.Steps to Reproduce
Failure Logs
Environment
The text was updated successfully, but these errors were encountered: