Commit graph

291 commits

Author SHA1 Message Date
daimond113
3bc1f0fa5c
fix: make bin linkers only for bin packages
Fixes binary linkers being made for non-binary
direct dependencies.
2025-03-14 08:58:45 +01:00
daimond113
412ce90e7f
feat: add proper versioning to lockfiles
Lockfiles now store a format field which is used
to migrate the them easily without brute forcing
the version it's at.
2025-03-09 18:57:20 +01:00
daimond113
b8c4f7486b
refactor: switch from sync Path::exists() method
This commit disallows the method through clippy
and switches to the async equivalents, as to not
block the async runtime.
2025-03-09 17:41:38 +01:00
daimond113
af93b7d584
fix: correctly get aliases for bin linkers
Fixes two issues with getting the aliases. The
first was that direct dependency aliases weren't
collected. The second is that these aliases would
be handled in a case-insensitive matter which is
incorrect.
2025-03-09 17:13:23 +01:00
daimond113
292565b647
feat: add @generated to lockfiles
Adds the @generated marker to lockfiles to make
them easily recognizable as auto-generated.
2025-03-09 16:16:44 +01:00
daimond113
e6ee935c11
feat: show available targets when none fit
This will help prevent user confusion with
targets. Instead of a cryptic "no matching
versions available" error, it'll now list the
available targets (if the source decides to output
them, so if the specifier has a target option)
2025-03-09 16:01:54 +01:00
daimond113
0e73db2831
fix: add missing run alias behaviour
The `run <alias>` behaviour was documented yet
missing. This commit adds it.
2025-03-09 14:53:22 +01:00
daimond113
19d6a07851
fix: make bin linkers for non-direct dependencies
Previously, binary linkers weren't made for
non-direct dependencies despite this being the
documented & expected behaviour.
2025-03-09 01:33:41 +01:00
daimond113
9a75ebf637
refactor: handle bin linkers in rust
Previously, binary linkers were handled by a Luau
script. This was not cross-runtime portable, and
forced us to do many "hacks" in order to be able
to implement them. To solve these issues, they are
now handled with Rust, which allows us to use our
existing infrastructure.
2025-03-09 01:18:12 +01:00
daimond113
41337ac96a
fix: dont inherit workspace by path dependencies 2025-03-08 23:24:35 +01:00
daimond113
9ad691ee94
refactor: undo send archive changes 2025-03-08 23:15:36 +01:00
daimond113
c7a8f919e2
refactor: apply clippy lints 2025-03-08 22:37:42 +01:00
daimond113
ff5c2e5d61
refactor: specify many new clippy lints
Adds quite a lot of Clippy lints which fit with my
personal taste for how pesde's codebase should
look like. Stylistic lints are mostly warns, and
behavioural lints are mostly denied.
2025-03-08 22:00:52 +01:00
daimond113
ef471069d8
fix: don't panic on SIGINT exits
Unwrapping the process code caused panics on
SIGINTs. Now we default to code 1 if there is
none.
2025-02-17 00:33:49 +01:00
daimond113
aa4f283e4c
refactor: allow publishing other packages on error
Previously, if a package failed to publish the
whole publishing process would halt. Then, if
a re-ran publishing got to an already published
package it'd error, which would require users to
manually publish the missing packages. This commit
fixes that by printing errors, but allowing other
members to still get published.
2025-02-16 11:32:16 +01:00
daimond113
ff6449a340
chore: fix formatting 2025-02-15 00:08:47 +01:00
daimond113
509838bb08
fix: remove typo in duplicate key error
The message previously contained "at line", but
we don't have a way of knowing the line number so
there was nothing after that. This commit removes
the "at line" part of the message.
2025-02-15 00:03:05 +01:00
daimond113
d6e2f611d8
perf: use or_else variants for expensive errors
This commit changes the error construction in
multiple places from the `*_or` to the `*_or_else`
variants. This is done to avoid the heap
allocation (for example, `to_string`) when there
is no need to.
2025-02-14 23:42:33 +01:00
daimond113
a4f2829db2
refactor: remove unused trait 2025-02-14 23:09:44 +01:00
daimond113
5c43e3cb95
refactor: improve outdated command output
Adds some colour to the outdated command which
fits in with other places such as the CLI's update
checker. Also, switches `->` to `→` which also
fits in with the CLI's update checker.
2025-02-13 20:16:42 +01:00
daimond113
82e0d38483
fix: print update available message to stderr
Previously, the update available message was
printed to stdout, which is not the correct
place for such messages. This commit changes
the message to be printed to stderr instead,
which will prevent potential issues with
piping the output of the command to another
command.
2025-02-13 20:10:08 +01:00
daimond113
ae3530126f
feat: add i alias to install command
Adds an alias `i` to the `install` command, which
is common in a few other package managers.
2025-02-12 23:15:01 +01:00
daimond113
4786adf187
refactor: make aliases case-insensitive
Previously, aliases: `foo` and `Foo` were treated
as different aliases. This could cause issues with
linking on case-insensitive filesystems. This
commit makes aliases case-insensitive, but they
will be stored in the case they were defined in.
2025-02-12 23:14:05 +01:00
daimond113
04aaa40c69
refactor: make specifier index not an option
Instead, we use the `default` serde attribute
to deserialize the index as `DEFAULT_INDEX_NAME`
if it is not present. This removes a lot of
redundancy around the codebase about getting
the index name.
2025-02-12 17:41:49 +01:00
daimond113
c6e7e74a53
fix: fix double long prefix paths on windows
Our previous attempt at fixing the long path issue
on Windows has caused a regression. This commit
attempts to fix both issues by simply
canonicalizing the path.
2025-02-10 22:52:00 +01:00
daimond113
ea9c7e6b39
fix: compile out patches without feature 2025-02-10 09:01:26 +01:00
daimond113
b6799e7400
fix: compile out patches without feature 2025-02-10 08:55:41 +01:00
daimond113
faaa76cf0d
fix: include new files in patches
Previously, newly created files would not be
included in patches. This commit fixes that.
Additionally, removes some left over dbg! calls.
2025-02-10 08:43:48 +01:00
daimond113
1d131e98c6
refactor: patch improvements
Patches now work much better with incremental
installs. They use a Git repository to reset
the patch to the original state before applying
it. They are now also properly cleaned up after
being removed. Also, to allow more flexability
the patching process is now done before type
extracting, so that types can be patched. Lastly,
the patch-commit command now doesn't delete the
patch directory until it has done everything else
to prevent data loss.
2025-02-10 00:35:51 +01:00
daimond113
8bb8888de8
fix: correct windows script linker require paths
The pathdiff crate doesn't behave properly when
one path begins with a long path prefix
and the other doesn't, so we always put the
prefix on paths.
2025-02-09 20:10:55 +01:00
daimond113
1a79326ebf
fix: refresh sources before reading from them
Previously, if a package was modified in a way
that the index hasn't been cloned (for example,
through a remote Git change) pesde would be unable
to read the package's metadata, whether it be
because the index was outdated or because it
wasn't cloned at all. These are now refreshed
as needed like everywhere else.
2025-02-08 14:03:43 +01:00
daimond113
a4927bf4be
fix: fix types not being re-exported
Code responsible for removing the file at the
destination has been removed which broke the
re-exporting of types. This commit reverts
that change, but also silences Windows errors
when removing the file.
2025-02-08 00:48:42 +01:00
daimond113
4d39ddae04
fix: point to the right path when fresh installing engines 2025-02-08 00:29:55 +01:00
daimond113
c71e879bfd
fix: fix linux zbus panicking
Fixes zbus on Linux panicking due to the crate
spawning a runtime inside of our own runtime. This
is avoided by using the sync mode of the crate
instead of async. Additionally, keyring operations
have been wrapped in spawn_blocking to avoid
blocking the async runtime.
2025-02-07 20:53:31 +01:00
daimond113
daf0861eb3
feat: colour deprecation message
Colours the text in the deprecation message to
match the yank command's UI.
2025-02-07 11:26:59 +01:00
daimond113
51fc6c3abd
refactor: move schema gen to test
Moves schema generation over to a test instead of
as a feature. This allows us to publish the crate
since we use a schemars from Git, which is not
supported by crates.io.
2025-02-06 23:49:25 +01:00
daimond113
c6242b8569
refactor: use better colors for the publish command
Switches the background color of the publish
command's package announcement to a better
looking color. Will possibly change the design
of the command's UI in the future.
2025-02-06 23:00:03 +01:00
daimond113
ba6a02e13b
fix: exit with code 1 from invalid directory bin linkers
Fixes #24.
2025-02-03 15:52:38 +01:00
daimond113
7ad4c6f5c6
chore: fix clippy lints 2025-02-03 15:52:24 +01:00
daimond113
0b5c233734
style: remove comma from ,) expressions 2025-02-02 15:25:11 +01:00
daimond113
6ae16a7dac
feat: add list and remove commands
Fixes #22.
2025-02-02 15:23:10 +01:00
daimond113
f0e69a08e2
refactor: use iteration over recursion
Replaces the recursive implementation of fallback
Wally registries with an iterative approach.
2025-02-02 14:06:38 +01:00
daimond113
6856746ae2
refactor: crate optimizations
Replaces chrono with jiff (already used due to
gix). Switches from the async-io to the tokio
feature in keyring. Removes dependency on
serde-with. Optimizes release mode executable
size by using aborting panics.
2025-02-02 00:17:11 +01:00
daimond113
24049d60a2
feat: ignore submodules in git dependencies
Previously, if a repository contained a submodule
pesde would throw an error since there is no
entries for them. Now, they are simply ignored.
2025-02-01 16:25:00 +01:00
daimond113
ca550eee3a
refactor: rename PackageFs::CAS to Cas
The name now fits in with the rest of the codebase.
2025-02-01 01:02:48 +01:00
daimond113
2154fc0e84
refactor: reorder commands in help message
Reorders the commands in the help message so they
appear in a more logical order.
2025-02-01 01:01:40 +01:00
daimond113
b30f9ecdeb
feat: cas pruning
Squashed commit of the following:

commit 82b4b858e5
Author: daimond113 <contact@daimond113.com>
Date:   Sat Feb 1 00:46:31 2025 +0100

    feat: remove unused directories when purging cas

    Now purging the CAS will also clean up unused
    folders. Additionally, since concurrent removal
    of directories seems to throw a PermissionDenied
    error on Windows those are ignored. Needs
    investigation on why that happens.

commit 75d6aa5443
Author: daimond113 <contact@daimond113.com>
Date:   Fri Jan 31 23:24:11 2025 +0100

    feat: finish prune command implementation

    The prune command now discovers packages in the
    CAS, removes individual unused files and then
    packages which use those files, since that means
    they're unused.

commit 333eb3bdd9
Author: daimond113 <contact@daimond113.com>
Date:   Sun Jan 26 23:30:52 2025 +0100

    chore: fix clippy lint

commit a38da43670
Author: daimond113 <contact@daimond113.com>
Date:   Sun Jan 26 23:02:52 2025 +0100

    feat: add cas pruning command

    Removes unused files from the CAS. Still needs to
    remove individual package index entries to be
    complete.
2025-02-01 00:51:43 +01:00
daimond113
5cc64f38ec
refactor: include more linking debug info
Logs every path used in the linking process.
2025-01-30 23:46:58 +01:00
daimond113
4009313281
fix: do not include incompatible files in workspace packages
Fixes `default.project.json` being copied if it
is present in a workspace package.
2025-01-30 23:45:31 +01:00
daimond113
3e4ef00f4a
chore: fix formatting 2025-01-24 23:45:26 +01:00