Skip to content

Commit

Permalink
unoconfig: rename Packages.* properties
Browse files Browse the repository at this point in the history
We want to stop saying "packages" when referring to Uno libraries
(fuse-open#440), so this renames the following unoconfig properties:

* Packages.SearchPaths -> SearchPaths
* Packages.SourcePaths -> SearchPaths.Sources

(The old names are deprecated but still work)
  • Loading branch information
mortend committed Mar 27, 2023
1 parent d8135d8 commit e13bdda
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .unoconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if WIN32 {
}

// Package config
Packages.SourcePaths += lib
SearchPaths.Sources += lib

// Tooling
Android.Emulator.Architecture: x86_64
Expand Down
4 changes: 2 additions & 2 deletions src/tool/engine/Libraries/BundleCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ public BundleCache(Log log, UnoConfig config, bool enableTranspiler = true)
_config = config;
_enableTranspiler = enableTranspiler;

foreach (var src in config.GetFullPathArray("Packages.SourcePaths"))
foreach (var src in config.GetFullPathArray("SearchPaths.Sources", "Packages.SourcePaths"))
_sourcePaths.AddOnce(Path.Combine(
File.Exists(src)
? Path.GetDirectoryName(src)
: src,
"build"));

foreach (var src in config.GetFullPathArray("Packages.SearchPaths"))
foreach (var src in config.GetFullPathArray("SearchPaths", "Packages.SearchPaths"))
_searchPaths.AddOnce(src);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/src/.unoconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Packages.SourcePaths += ../lib
SearchPaths.Sources += ../lib

0 comments on commit e13bdda

Please sign in to comment.