Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submodules: question and suggestion #116

Open
charlesroddie opened this issue May 11, 2020 · 26 comments
Open

Submodules: question and suggestion #116

charlesroddie opened this issue May 11, 2020 · 26 comments
Labels
Resolution/Answered The provided question has been answered. Type/Question

Comments

@charlesroddie
Copy link
Collaborator

Given that submodules are used, what is the way to use them with Visual Studio?

git submodule update -- init works sometimes but not always.

Still leaves

image

If we get instructions here we can then put them on the main page. Currently I have to ask @Happypig375 for submodule maintenance every time I try to work with the repo.

Also can we review what submodules are needed?

  • Wiki can be placed directly in the repo so doesn't need to be a submodule.
  • Why is SkiaSharp.Extended a submodule? The nuget package should be used.
  • Need for Typography submodule is tracked here: NuGet package? LayoutFarm/Typography#96
  • Why is nerdamer a submodule?
@Happypig375
Copy link
Collaborator

Those three submodules have been removed, just delete these folders.

@Happypig375
Copy link
Collaborator

Happypig375 commented May 11, 2020

Wiki can be placed directly in the repo so doesn't need to be a submodule.

It syncs with the wiki page directly, and it is a repository itself. Therefore, a submodule is used. It was renamed to CSharpMath.Wiki from wiki, so you can delete wiki.

Why is SkiaSharp.Extended a submodule? The nuget package should be used.

It was a submodule because there were SVG fixes not present in the NuGet package which was very outdated. This dependency is now removed, you can delete it.

Need for Typography submodule is tracked here: LayoutFarm/Typography#96

It currently points to my fork until LayoutFarm/Typography#192 is merged.

Why is nerdamer a submodule?

That was before I discovered https://github.com/asc-community/AngouriMath. I planned to wrap a JavaScript math evaluation library. That is now removed. You can delete it safely. (I didn't like MathNet.Symbolics's API design.)

@Happypig375
Copy link
Collaborator

Also can we review what submodules are needed?

There are currently AngouriMath, CSharpMath.Wiki and Typography. AngouriMath has NuGets, but I would like to keep even more up-to-date than the NuGet packages, so any PRs made by me can be used even more quickly.

@Happypig375
Copy link
Collaborator

Any more questions?

@charlesroddie
Copy link
Collaborator Author

Just nuking and re-cloning my repo now.

@charlesroddie
Copy link
Collaborator Author

Cloning from VS works and runs the forms example project.

@Happypig375
Copy link
Collaborator

Okay, problem has been solved.

@Happypig375 Happypig375 added the Resolution/Answered The provided question has been answered. label May 26, 2020
@charlesroddie
Copy link
Collaborator Author

No just the initial workflow passed for building and running.

It actually leaves the system in an error state

image

@charlesroddie charlesroddie reopened this May 27, 2020
@charlesroddie
Copy link
Collaborator Author

AngouriMath has a nuget package so we should use that (assuming that the projects dependent on it should remain in this repo).

@Happypig375
Copy link
Collaborator

Sometimes you need to do git submodule update again when submodules are updated.

@charlesroddie
Copy link
Collaborator Author

No change
image

@Happypig375
Copy link
Collaborator

What does git status say about each of the submodules?

@charlesroddie
Copy link
Collaborator Author

image

I am in branch issue108/DeletePlaceholder but have not changed anything.

@Happypig375
Copy link
Collaborator

I mean git status inside the submodule folders (cd to AngouriMath and Typography, then git status)

@charlesroddie
Copy link
Collaborator Author

image

@Happypig375
Copy link
Collaborator

Seems to be automatic Visual Studio regeneration of Android designer files.

@Happypig375
Copy link
Collaborator

Just do a git reset --hard and it will go away.

@charlesroddie
Copy link
Collaborator Author

image

@charlesroddie
Copy link
Collaborator Author

So the problem is those repos haven't set up their gitignores right?

@Happypig375
Copy link
Collaborator

Happypig375 commented May 27, 2020

For AngouriMath, those files are automatically generated by calling ANTLR by MSBuild pre-build.

@Happypig375
Copy link
Collaborator

So the problem is those repos haven't set up their gitignores right?

Maybe...

@charlesroddie
Copy link
Collaborator Author

With git submodules, bugs in their setup become bugs in CSharpMath's setup, so those need to be fixed to get CSharpMath's git into a working state.

@Happypig375
Copy link
Collaborator

These aren't really bugs as GitHub Actions can run successfully. I also didn't experience this when working locally.

@Happypig375
Copy link
Collaborator

Happypig375 commented May 27, 2020

Modified submodules will not count as changes in commits, so you can still commit fine.

@charlesroddie
Copy link
Collaborator Author

We definitely need to reference AngouriMath from a nuget package, if it is retained at all. It's peripheral to this repo and warnings about it appear on build if it is submodule referenced.

@Happypig375
Copy link
Collaborator

We definitely need to reference AngouriMath from a nuget package

I have a dedicated AngouriUpdate branch for tracking updates for AngouriMath. Having a submodule allows pointing to individual commits instead of restricting to versions on NuGet. This way, I can change CSharpMath directly after a PR to AngouriMath is merged.

if it is retained at all

I will retain this and will not remove it.

It's peripheral to this repo

I define core and peripheral as projects in the _Core folder and projects under folders not starting with underscores respectively. Core and peripheral are also cross-platform code and platform-specific code respectively. CSharpMath.Evaluation is core while CSharpMath.SkiaSharp is peripheral.

warnings about it appear on build if it is submodule referenced.

That is not a problem for me. You can submit a PR to fix the warnings to AngouriMath if they really bother you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution/Answered The provided question has been answered. Type/Question
Projects
None yet
Development

No branches or pull requests

2 participants