-
Notifications
You must be signed in to change notification settings - Fork 230
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
How does versioning work for custom forks? #773
Comments
@matthew-carroll I was not able to replicate the issue using a git clone command as is. However, I do get this problem is if I set a --depth parameter, which you should not do, as Flutter tools depend on repository references to determine their version. I have added a warning. Are you using any special parameter during the clone? |
Nope, no special flags. I went to the versions directory and did a standard Where is the "Flutter Version" value being pulled from? |
BTW, here's my RC file, if it's relevant:
|
@leoafarias is there something else I should do to debug this? This is a blocker for using FVM... |
All fvm does is run the flutter tool in the directory. Did you try running the forked version directly? Meaning, adding this clone to the path and running the version command? Can you see the version number if you do that? Also, is the fork on any particular branch, tag, or version? Also something that might help |
@matthew-carroll I ran successfully. You should remove the flutterUrl from your rc file. If you are cloning the repository to the fork: First option You do not use the The flutterUrl and config are used for the Second Option terminal.mp4 |
Ok - I'd like the config per project. So I deleted my clone of the fork. Then I put the following in the RC file in my project:
I run
|
@matthew-carroll I have found a typo in the docs and it should be {
"flutterUrl": "https://github.com/Flutter-Foundation/flutter.git"
} When you run something like It will install the version master from this repository. I have done it and here is what it shows. Flutter 3.25.0-1.0.pre.275 • channel master • https://github.com/Flutter-Foundation/flutter.git
Framework • revision a341c7f174 (2 hours ago) • 2024-09-05 12:28:45 +0000
Engine • revision 34b61eb53b
Tools • Dart 3.6.0 (build 3.6.0-216.0.dev) • DevTools 2.39.0 Keep in mind, as stated in the docs, the branch needs to be the branch or tags used in the repo now. FVM will use this repository to fetch the versions, which means these versions should not conflict with other versions that are cached. FVM does not have the feature to hold project-specific cache. Let me know if that helps. |
fvm should have installed the master branch from your fork. .fvmrc is changed and managed by fvm, which determines which version is currently linked. I can update the docs and improve but it seems you are trying to use 2 approaches, the custom version and the custom repo, they are not compatible You either setup flutterUrl or do the fork as I mentioned first. |
Like I said, I've simply tried to do what you've mentioned, but you've mentioned a number of different approaches, each with partial instructions. I've tried to be very clear with my goal. I want a specific Flutter project to use a fork of Flutter. I have no opinion about how that's accomplished. Nothing I've tried has worked. I guess I'll just start digging into the source code and figure out what FVM is trying to do. |
I have updated the docs based on the previous discussion. It does breaks down into 2 different approaches. If the docs are not clear let me know! Also let me know if you prefer to get on a dm or call might be easier. |
@leoafarias I think a call would be much easier. I imagine that we can probably work through this in about 5 minutes. |
@matthew-carroll closign this issue, and will create a new issue in reference to namespacing forks |
I setup a custom fork following instructions: https://fvm.app/documentation/advanced/custom-version
However, the reported Flutter version is
0.0.0-unknown
:How should I resolve this?
When running
fvm flutter pub get
I get the following error:The text was updated successfully, but these errors were encountered: