Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions BeefBuild/src/BuildApp.bf
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ namespace BeefBuild
Fail("Platform not specified");

base.Init();
InitUserDataDir();

mSettings.Load();
mSettings.Apply();
Expand Down
2 changes: 2 additions & 0 deletions IDE/src/BeefConfig.bf
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ namespace IDE
#endif
if (Directory.CreateDirectory(managedPath) case .Ok)
mManagedLibPath.Set(managedPath);
else
gApp.OutputErrorLine("Failed to create managed library directory '{0}'", managedPath);
}

mConfigFiles.Add(configFile);
Expand Down
19 changes: 14 additions & 5 deletions IDE/src/IDEApp.bf
Original file line number Diff line number Diff line change
Expand Up @@ -3372,7 +3372,11 @@ namespace IDE
}
else
{
mPackMan.GetWithVersion(projectName, url, ver);
if (mPackMan.GetWithVersion(projectName, url, ver) case .Err)
{
Fail(scope $"Failed to initialize managed library support for project '{projectName}'");
return .Err(.NotFound);
}
isDeferredLoad = true;
}
default:
Expand Down Expand Up @@ -13081,6 +13085,14 @@ namespace IDE
return mVersionInfo;
}

protected void InitUserDataDir()
{
#if BF_PLATFORM_LINUX && LINUX_PACKAGE
delete mUserDataDir;
mUserDataDir = new $"{Environment.GetEnvironmentVariable("HOME", .. scope .())}/.config/beeflang/";
#endif
}

#if !CLI
public override void Init()
{
Expand Down Expand Up @@ -13110,10 +13122,7 @@ namespace IDE
mSettings.Apply();

mGitManager.Init();

#if BF_PLATFORM_LINUX && LINUX_PACKAGE
mUserDataDir = new $"{Environment.GetEnvironmentVariable("HOME", .. scope .())}/.config/beeflang/";
#endif
InitUserDataDir();

//Yoop();

Expand Down
7 changes: 4 additions & 3 deletions IDE/src/util/PackMan.bf
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,10 @@ namespace IDE.util
mWorkItems.Add(workItem);
}

public void GetWithVersion(StringView projectName, StringView url, SemVer semVer)
public Result<void> GetWithVersion(StringView projectName, StringView url, SemVer semVer)
{
if (!CheckInit())
return;
return .Err;

bool ignoreLock = false;
if (gApp.mWantUpdateVersionLocks != null)
Expand All @@ -309,7 +309,7 @@ namespace IDE.util
case .Git(let checkURL, let tag, let hash):
if (checkURL == url)
GetWithHash(projectName, url, tag, hash);
return;
return .Ok;
default:
}
}
Expand All @@ -324,6 +324,7 @@ namespace IDE.util
if (semVer?.IsEmpty == false)
workItem.mConstraints = new .() { new String(semVer.mVersion) };
mWorkItems.Add(workItem);
return .Ok;
}

public void UpdateGitConstraint(StringView url, SemVer semVer)
Expand Down
Loading