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

show latest major version available in gleam deps update #3876

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4ff9650
feat(dependency): add function to get latest major version info of de…
andho Nov 22, 2024
b26383e
feat(dependencies): check and show new major versions are available f…
andho Nov 22, 2024
665d474
feat: only check for major version for direct dependencies :sparkles:
andho Nov 22, 2024
b1c895a
feat: ignore pre release versions and sort versions before getting la…
andho Nov 22, 2024
7aaf653
refactor(dependencies): output major version availability hint to std…
andho Dec 6, 2024
af82ec8
refactor: move major version check into a separate testable unit :rec…
andho Dec 6, 2024
88c266c
feat(dependencies): pretty print major version update hint into colum…
andho Dec 6, 2024
0347cc9
refactor: improve the test case so the direct dependency is not updat…
andho Dec 6, 2024
6ff58f2
feat(dependencies): cache package info from hexpm to reduce duplicate…
andho Dec 6, 2024
da80b0e
refactor(dependencies): return formatted string and eprint :recycle:
andho Dec 12, 2024
b724fb0
refactor(dependency): remove unnecessary clone and use `max` instead …
andho Dec 12, 2024
737d0d5
refactor(dependencies): use the same `PackageFetcher` during dependen…
andho Dec 13, 2024
a30850d
docs(dependencies): fix doc comment for `cache_package` :bug: :memo:
andho Dec 13, 2024
126fa23
refactor: remove dyn for PackageFetcher :recycle:
andho Dec 28, 2024
c7373c3
refactor(dependencies): move get_manifest and resolve_versions into a…
andho Dec 28, 2024
5ae628b
refactor(dependencies): only check for major versions on update and d…
andho Dec 28, 2024
340afe5
refactor(dependencies): move DependencyManager config stuff to method…
andho Dec 28, 2024
49d8d9e
refactor(dependencies): share package using Rc instead of cloning :re…
andho Dec 28, 2024
f2b74ab
refactor(dependencies): Removed "Hint:" from major version notificati…
andho Jan 17, 2025
f137b52
refactor(dependencies): use enum (CheckMajorVersions) instead of bool…
andho Jan 17, 2025
772b2c6
refactor(dependencies): add better api for initializing DependencyMan…
andho Jan 17, 2025
36d0578
fix(dependencies): use `PackageVersionDiffs` everywhere applicable :fix:
andho Jan 17, 2025
fd5f705
refactor(dependencies): add `into_dependency_manager` function :recycle:
andho Jan 17, 2025
e081e9e
refactor(dependencies): remove default impl for DependencyManagerConf…
andho Jan 23, 2025
5e0504f
docs(dependencies): add docs for DependencyManagerConfig struct field…
andho Jan 24, 2025
db6133e
fix(dependencies): remove unnecessary constraints :label:
andho Jan 24, 2025
80eb925
refactor(dependencies): remove `mode` from public interface :recycle:
andho Jan 25, 2025
385bc90
refactor(dependencies): make DependencyManager private :recycle:
andho Jan 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions compiler-cli/src/add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use gleam_core::{

use crate::{
cli,
dependencies::{parse_gleam_add_specifier, UseManifest},
dependencies::{self, parse_gleam_add_specifier},
fs,
};

Expand All @@ -21,12 +21,15 @@ pub fn command(packages_to_add: Vec<String>, dev: bool) -> Result<()> {

// Insert the new packages into the manifest and perform dependency
// resolution to determine suitable versions
let manifest = crate::dependencies::download(
let manifest = dependencies::download(
&paths,
cli::Reporter::new(),
Some((new_package_requirements.clone(), dev)),
Vec::new(),
UseManifest::Yes,
dependencies::DependencyManagerConfig {
use_manifest: dependencies::UseManifest::Yes,
check_major_versions: dependencies::CheckMajorVersions::No,
},
)?;

// Read gleam.toml and manifest.toml so we can insert new deps into it
Expand Down
14 changes: 11 additions & 3 deletions compiler-cli/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,22 @@ use gleam_core::{

use crate::{
build_lock::BuildLock,
cli,
dependencies::UseManifest,
cli, dependencies,
fs::{self, get_current_directory, get_project_root, ConsoleWarningEmitter},
};

pub fn download_dependencies(telemetry: impl Telemetry) -> Result<Manifest> {
let paths = crate::find_project_paths()?;
crate::dependencies::download(&paths, telemetry, None, Vec::new(), UseManifest::Yes)
dependencies::download(
&paths,
telemetry,
None,
Vec::new(),
dependencies::DependencyManagerConfig {
use_manifest: dependencies::UseManifest::Yes,
check_major_versions: dependencies::CheckMajorVersions::No,
},
)
}

pub fn main(options: Options, manifest: Manifest) -> Result<Built> {
Expand Down
Loading