Skip to content

Commit

Permalink
fixed dependency language not being updated
Browse files Browse the repository at this point in the history
  • Loading branch information
harshdoesdev committed Feb 9, 2024
1 parent 847823d commit 8a8f031
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion fastn-core/src/config/config_temp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ impl ConfigTemp {
let mut all_packages = std::collections::BTreeMap::new();

for (package_name, manifest) in &self.all_packages {
let mut current_package = manifest.to_package(package_root, package_name, ds).await?;
let mut current_package = manifest
.to_package(package_root, package_name, ds, package)
.await?;
ConfigTemp::check_dependencies_provided(package, &mut current_package)?;
all_packages.insert(package_name.clone(), current_package);
}
Expand Down
6 changes: 5 additions & 1 deletion fastn-core/src/manifest/manifest_to_package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ impl fastn_core::Manifest {
package_root: &fastn_ds::Path,
package_name: &str,
ds: &fastn_ds::DocumentStore,
main_package: &fastn_core::Package,
) -> fastn_core::Result<fastn_core::Package> {
let mut package = fastn_core::Package::new(package_name);
package
.resolve(&package_root.join(package_name).join("FASTN.ftd"), ds)
.await?;
package.auto_import_language(None, None)?;
package.auto_import_language(
main_package.requested_language.clone(),
main_package.selected_language.clone(),
)?;

Ok(package)
}
Expand Down

0 comments on commit 8a8f031

Please sign in to comment.