Flutter broken after gitlab commit // Help needed - flutter

I'm using the source controle feature in Visual Code to have my Flutter project backed up via Gitlab. About two days ago, suddenly I had Flutter in the list of projects that can be committed/synchronised. I made the mistakte of pressing the button. It did something and then told me there are conflicts merging files.
Now everything is broken, If I try running my project I get a really long list of errors I do not understand (see below). Flutter in source control has loads of red exclamation marks. I'm a beginner and completely out of my depth here. So I dont wan't to touch more things I don't fully understand.
Can anyone give me a hint whow to fix this mess without breakting more things?
Erorr messages:
Blockquote
And a lot more like this below.

Related

VS Code won't autosuggest when importing a file

(Currently using VS Code on macOS Monterey, mostly for React and JavaScript.)
When I used to import a component at the top of my file, Vs Code would suggest the path of the file. I would simply press enter or click on the suggestion and VS Code would fill in the rest. Seems to me like a standard feature of VS Code, and I've grown pretty accustomed to it.
Now, it doesn't suggest anything. I'll type out a file that exists in the project, and nothing appears. I've tried it with several projects, and none of them suggest anything anymore — when just last week it was working fine.
trying to import
One thing... I have a lingering suspicion that it's from doing this:
npm i #types/react -g
A friend recommended I add it. With it, you can declare a component in your project and VS Code will auto import it. Really, it's the only thing I can remember changing since this strange behavior with VS Code started, but I'm not positive. Just a suspicion. I've tried to remove it, but it didn't fix anything.
I've done a bunch of stuff found on stackoverflow already with no improvements:
adding to setting.json, like this, or this
even deleted VS Code w/ extensions

How to make custom changes to a VSCode extension directly from the extensions folder

Good day. I have a third-party VSCode extension that's been throwing an error all day. In order to actually diagnose this, and then submit an issue on the parent GitHub repository, I've been poking around and trying to figure out where the error is being thrown from.
I have a decent idea where the error is originating from, but I'd like to add a console.debug statements to confirm this.
My question is this: I've made changes to the actual VSCode extension source code (installed within the VSCode extensions folder ), but VSCode is not picking up those changes. What do I do? Clean the cache or something, I'm not quite sure.
The source file is basically just a Ts-compiled-to-JS file, so still pretty easy to work with.
I've checked out the Developer Tools Console (Ctrl+Shift+I), but the error stack is not particularly helpful.

Very unusual error that I have never seen. UNITY

Im getting this weird error that I have never seen before and i have like 400 of them and they i think are all different. Here is an example Library\PackageCache\com.unity.test-framework#1.1.20\UnityEngine.TestRunner\NUnitExtensions\Runner\UnityTestExecutionContext.cs(125,34). This also happened right after my pc shorted out. I fixed it loaded up unity and all my files were gone. I was planning on trying to redo some of my stuff when this came up. I'm also having a warning about a meta data file existing but its packages cant be found. I don't know if these are connected or not. This is also a brand new project so its not anything old.
Answer: Go to your library and you will find all your projects and such there. If you locate to the project you are currently working on find a folder called package cache. Delete this and you will have no more errors!

Flutter VS Code Quick Fix not suggesting import

Everything worked fine until a couple of days ago. Whenever I create new widgets or create some files and want to use them, I don't manually type import package:... but start typing the name of that class and press ctrl + . which provided a list of Quick fixes and always suggested import package:... until recently. No changes to Windows / Flutter / Dart / VS Code have been made except I installed svg-explorer-extension after following this advice (which I would highly doubt affected anything, yet it still updated some x64 c++ distribution something).
Right now, as I try to use existing files (all of them are in */lib folder) in the new files I create, the Quick fix menu provides all except import package:... options which makes the development process slow enough to ask a question here.
The only way to 'recover' that functionality is to run Developer: Reload Window in VS Code which stops the debug session, restarts Dart Analyzer, and everything seems to be okay for the next couple of minutes until it simply disappears.
How to not 'lose' that importing functionality? My project is rather big (22k lines) with 30+ dependencies. I tried reinstalling flutter SDK, flutter, and dart extensions from VS Code and that didn't help.
What suggestions do you have? Is this issue worth filing an issue for Flutter / Dart / Flutter Extension on GitHub?
Happening with recently and was fixed with the restart to update option.
It was so annoying and wasted my 1 hour searching over google and StackOverflow.
I was also stucked in this issue and the real answer to this question according to my analysis is : always create new widgets or dart classes within lib folder. You can create different folders such as widgets, screens, models but always create them in lib folder dont create them at the root level. Your problem of import will be solved. Infact VSCode will auto-import them
You can refer to this image below and see how I organized my lib folder
[1]: https://i.stack.imgur.com/Yau5i.png

LibGit2Sharp problems

I am trying to use LibGit2Sharp in Unity 2018.2 beta, because previous versions of Unity doesn't support .NET Framework 4.7.1, which will be needed for LibGit2Sharp.
I wanted to try a few things first and came across the following problems:
if I try to clone a repository (I have used the example on GitHub first: https://github.com/libgit2/libgit2sharp/wiki/git-clone), I get an "LibGit2SharpException: failed to send request" error in Unity.
I have also tried to get information from a working copy. I create a Repository with new Repository(string path), get the RepositoryStatus from it with rep.RetrieveStatus(new StatusOptions()). Now, if I try to access the state of files, it causes a crash in Unity. No matter if I iterate through all files and want to print file.State, or want to get a specific FileStatus list from the whole status (example: status.Added). However, printing the filepaths works.
Fetching does not works either for me, it throws the same exception as the clone command.
I think the second one is maybe just an issue, but clone and fetch should work.
Update: sadly, I keep facing problems in my project with libgit2sharp in Unity. I want to make a commit, now if i try to iterate through the StatusEntries to stage the files, Unity just crashes, but sometimes it works. It is really hard to reproduce the bug, and often I get different crashlog-entries for the same process. The last time I have tried today the error was:
0x00007FFB417386CE (git2-6311e88) [c:\projects\libgit2sharp-nativebinaries\libgit2\src\diff_generate.c:1352] git_diff_tree_to_index
I have created a test-repository in my program using the Github API and cloned this to my pc, this works fine so far. And then if I create some files in the folder and want to make a commit, I run into the error above. Sadly this is one of several other issues and I can't really make progress with my project.
I have installed libgit2sharp and binaries with the Nuget Package Manager of Visual Studio.
Does anyone have experience with LibGit2Sharp and maybe some ideas of what I could be doing wrong, or why these things don't work for me?
Update 2: I'm still trying to solve the problem. I have now tested multiple times the different ways to get informations about the file-status of a repository. The best way to do it in my project would be with Repository.RetrieveStatus(filePath), now if I try this, it throws an AmbiguousSpecificationException. Can somebody explain, what does this exactly mean and how can I avoid it? I have also tried to force a literal path evaluation with Repository.RetrieveStatus(new StatusOptions() { DisablePathSpecMatch = true }); as recommended in the message of the AmbiguousSpecificationException, but then Unity crashes with the error-log in the first Update of this Post.
I had the same problem where Unity crashed on RetrieveStatus(); call. Seems like this might be a bug in LibGit2Sharp since RetrieveStatus("filepath") worked for me. I used the latest libgit2sharp commit (0dcaefc) and Unity 2018.3.0f2.
I used the absolute filepath and "\" instead of "/" (running on Windows 10).