Skip to content

feat(cli): warn that std libs are ignored if --include-std is not passed#97

Merged
andrius-puksta-sensmetry merged 1 commit intomainfrom
ap/warn-std
Nov 4, 2025
Merged

feat(cli): warn that std libs are ignored if --include-std is not passed#97
andrius-puksta-sensmetry merged 1 commit intomainfrom
ap/warn-std

Conversation

@andrius-puksta-sensmetry
Copy link
Copy Markdown
Collaborator

Closes #94.

@andrius-puksta-sensmetry andrius-puksta-sensmetry changed the title Warn that std libs are ignored if --include-std is not passed feat(cli): warn that std libs are ignored if --include-std is not passed Nov 3, 2025
@tilowiklundSensmetry
Copy link
Copy Markdown
Member

This looks good, but I think, at least for now, we need to always show some sort of warning when --include-std is not used.

We have already had one issue opened #92 where the fact that the standard library did not get installed (even though it's a transitive dependency) led to confusion.

The message can be much shorter in this case, and I would propose simply always printing it for any command that involves installing dependencies.

Once this behaviour is either standardised or widely understood we can remove the message.

@andrius-puksta-sensmetry
Copy link
Copy Markdown
Collaborator Author

This looks good, but I think, at least for now, we need to always show some sort of warning when --include-std is not used.

This PR does always print the warning, except for the lock command.

@tilowiklundSensmetry
Copy link
Copy Markdown
Member

This looks good, but I think, at least for now, we need to always show some sort of warning when --include-std is not used.

This PR does always print the warning, except for the lock command.

$ sysand env install "urn:kpar:sysmod"
     Syncing env
  Installing urn:kpar:sysmod 5.0.0-alpha.2
$

says nothing about not installing stdlib dependencies, even though they are explicit dependencies of sysmod (this is precisely the case that confused the user in the ticket above).

@andrius-puksta-sensmetry
Copy link
Copy Markdown
Collaborator Author

It does:

$ sysand env install 'urn:kpar:systems-library'`
warning: SysML/KerML standard library package 'urn:kpar:systems-library'
         is ignored, as it should always be provided by your tooling.
         If you want to process it, pass the '--include-std' flag
     Syncing env
env is up to date

(it shouldn't sync the env if packages didn't change, will fix that)

@tilowiklundSensmetry
Copy link
Copy Markdown
Member

tilowiklundSensmetry commented Nov 4, 2025

It does:

$ sysand env install 'urn:kpar:systems-library'`
warning: SysML/KerML standard library package 'urn:kpar:systems-library'
         is ignored, as it should always be provided by your tooling.
         If you want to process it, pass the '--include-std' flag
     Syncing env
env is up to date

(it shouldn't sync the env if packages didn't change, will fix that)

When explicitly trying to install a standard library project yes, but not if that standard library project is only a (transitive) dependency, which will effectively be almost every project.

@andrius-puksta-sensmetry
Copy link
Copy Markdown
Collaborator Author

Sorry, my bad. I meant to check with urn:kpar:sysmod, but somehow forgot.

@andrius-puksta-sensmetry
Copy link
Copy Markdown
Collaborator Author

Fixed:

sysand env install 'urn:kpar:sysmod'
warning: Direct or transitive usages of SysML/KerML standard library packages are
         ignored by default. If you want to process them, pass `--include-std` flag
     Syncing env
  Installing urn:kpar:sysmod 5.0.0-alpha.2

Also shortened the warning messages and made them more specific.
Fixed npm tests by installing dev deps with npm install. No idea why they were working in CI before, probably CI works diferently from bindings/js/scripts/run_tests.sh.

…assed

also fix npm tests

Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
Copy link
Copy Markdown
Member

@tilowiklundSensmetry tilowiklundSensmetry left a comment

Choose a reason for hiding this comment

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

👍

@andrius-puksta-sensmetry andrius-puksta-sensmetry merged commit 3925070 into main Nov 4, 2025
39 checks passed
@andrius-puksta-sensmetry andrius-puksta-sensmetry deleted the ap/warn-std branch November 4, 2025 15:52
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.

Generate warning or indication that standard library projects have been excluded from installation

3 participants