Miunie
Miunie copied to clipboard
ποΈ - Upgrade LiteDB
:warning: This issue is currently blocked until #308 is resolved.
Summary
Our Miunie.Infrastructure
project is currently using LiteDB
version 4.1.4
. There has been a major release since we implemented this. The goal is to upgrade to the new version of LiteDB
and ensure that everything still works.
How to implement
Bumping the NuGet package version number is a good start. You will, however, need to resolve potential issues in PersistentStorage.cs
.
Interested? π
If you'd like to help us by solving this issue, just say so in the comments. β€οΈ And don't shy away from asking any kind of question you might have.
Should you have any questions at all, feel free to contact either me (@petrspelos) or @DraxCodes on our Discord server:
And of course, thank you so much for contributing! π It's because of amazing people like yourself that Miunie exists.
Could I try to solve that one?
Of course, @AlexGipp. It's all yours. β€οΈ Let me know if you have any questions or get stuck. π
How do I start the bot so I can test if my changes cause any errors? I didn't find anything in the documentation. (The tests pass without any errors)
@AlexGipp, you're right. The documentation is still lacking since we separated the front-ends into their own repositories recently.
It would be neat if you could perhaps write a couple of unit tests to ensure this behavior works as expected. You are going to need to ensure the generated Miunie.db
file is deleted after each test, since unit tests should not depend on one another.
This can be achieved by your test method implementing the IDisposable
interface and then deleting the database file in the IDisposable.Dispose
method.
However, you're still going to want to run the application. For that, I would recommend the Miunie.Console
front-end.
The setup is slightly complex, since you already started development in your own fork, I assume.
- You should clone the Miunie console project recursively:
git clone --recurse-submodules -j8 [email protected]:control-net/miunie-console.git
- You then need to build the core submodule at least once, this is triggered with the project build from a command line:
dotnet build miunie-console/src
- Navigate into the Core submodule:
cd miunie-console/src/Miunie
Notice that git remote -v
here suggests you're working on the main Core repository (https://github.com/control-net/Miunie
).
You want to switch this to your fork:
You should also make sure you don't have any pending changes before you start changing the remote.
git remote set-url origin [email protected]:petrspelos/Miunie.git
β οΈ Notice my username in the url, this points to my fork.
- Add upstream:
git remote add upstream https://github.com/control-net/Miunie
performing git remote -v
should now output:
origin [email protected]:YOUR-USERNAME-HERE/Miunie.git (fetch)
origin [email protected]:YOUR-USERNAME-HERE/Miunie.git (push)
upstream https://github.com/control-net/Miunie (fetch)
upstream https://github.com/control-net/Miunie (push)
- Ensure your fork is up to date:
git checkout master
git fetch upstream
git merge upstream/master
git push
At this point, you're working on an updated fork within the context for a Miunie Console submodule.
Now is when you make changes in the submodule.
To ensure you know where to work, you can perform explorer .
to open Windows explorer there or .\src\Miunie.sln
to directly open the solution.
βΉοΈ If you still have a previous version of this repository, you may delete it.
To run the application, you then go to the MiunieConsole.sln and run the ConsoleApp project. The structure looks like this:
miunie-console
ββββsrc
ββββMiunie
β ββββ.github
β ββββ.vscode
β ββββdocs
β ββββsrc
β ββββMiunie.Core
β ββββMiunie.Discord
β ββββMiunie.Infrastructure
β ββββMiunie.InversionOfControl
β ββββMiunie.Tests
ββββMiunie.ConsoleApp
ββββMiunieConsole.sln
It's basically a repository in a repository. It's called a git submodule.
Awesome thanks for that detailed explanation, will look into it π