Skip to content

Enforce SPDX licenses by default, allow opting out of semver versions#127

Merged
andrius-puksta-sensmetry merged 14 commits intomainfrom
ap/semver-spdx
Dec 4, 2025
Merged

Enforce SPDX licenses by default, allow opting out of semver versions#127
andrius-puksta-sensmetry merged 14 commits intomainfrom
ap/semver-spdx

Conversation

@andrius-puksta-sensmetry
Copy link
Copy Markdown
Collaborator

@andrius-puksta-sensmetry andrius-puksta-sensmetry commented Nov 24, 2025

Changes

  • by default, require that license is an SPDX license expression, but allow opting out
    This is implemented in CLI, but not in bindings. How should this be handled there?
  • allow opting out of using a semantic version
    This is implemented in CLI, but not in bindings. Again, how should this be handled there?
  • use license spelling instead of the less common licence; commands have aliases for both variants
  • style: consistently use `` for quoting everything (mostly IRIs)
  • use serialization instead of serialisation to match common usage other crates/ecosystems
  • (Java bindings) throw an exception instead of panicking in all reasonable cases in bindings code (part of Consider replacing panics with internal errors #110)
  • (Java bindings) unify our JNI extension traits to JniExt
  • unify new and init commands into init; this avoids internal duplication and potential user confusion over which command to use
  • always use create_dir_all() for new project dir; this means we require that the directory does not exist yet (exception for current dir is made). This matches Cargo and uv and also allows doing sysand init a/b/c/d/e/f, where none of them exist in advance

Fixes

  • (Java bindings) fix std exception names
  • correctly treat version requirements of packages when installing them through sysand env install
  • allow using dependency options in sysand info <subcommand>
  • for info subcommand, only print std lib warning when command is usage, as it's the only command that may include output about std libs

CLI improvements

  • require that sysand info set <website> is supplied a valid IRI, but tolerate a missing scheme and default to https:// in that case
  • improve error and log messages in many places
  • use custom wrapper for current_dir() to give nicer errors
  • more consistently utilize wrapfs methods where possible for better errors

Docs

  • document requirements for versions, version constraints and licenses, in user guide, CLI and javadoc
  • use console type for console session highlighting
  • use sh instead of bash highlighting for most shell commands

Tests

  • (Java bindings) check that all custom Sysand exceptions are present
  • test that semver crate defaults to caret (^) version requirement
    if none is present, as we promise this behaviour

Comment thread core/src/solve/pubgrub.rs Outdated
Comment thread docs/src/metadata.md Outdated
Comment thread sysand/src/cli.rs Outdated
@andrius-puksta-sensmetry andrius-puksta-sensmetry force-pushed the ap/semver-spdx branch 8 times, most recently from 534a3de to de0d84b Compare December 1, 2025 09:06
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>

update deps

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

compat with Rust <1.88

Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
…info subcommands

Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
…) in tests

Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
…), more consistency

Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
This means that the directory must not already exist

Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
Comment thread sysand/src/cli.rs
Comment thread Cargo.toml Outdated
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
Co-authored-by: Victor Linroth <victor.linroth@sensmetry.com>
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
Copy link
Copy Markdown
Collaborator

@victor-linroth-sensmetry victor-linroth-sensmetry left a comment

Choose a reason for hiding this comment

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

I can't fully vouch for the Java stuff but it seems like it's fine. Everything else looks good too.

@andrius-puksta-sensmetry andrius-puksta-sensmetry merged commit 5250a49 into main Dec 4, 2025
51 checks passed
@andrius-puksta-sensmetry andrius-puksta-sensmetry deleted the ap/semver-spdx branch December 4, 2025 11:03
andrius-puksta-sensmetry added a commit that referenced this pull request Jan 27, 2026
…g a kpar (#150)

Final part of #127, forgot to include it there.

Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
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