pingbird / puro

A powerful tool for installing and upgrading Flutter versions.

Home Page:https://puro.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add symlink to the pub cache

feinstein opened this issue · comments

When we use flutterfire_cli (please test it with the latest dev version 0.3.0-dev.19) it creates a build script in ios, inside xcode, to move the firebase files to the correct folder. The script looks like this:

#!/bin/bash
PATH=${PATH}:$FLUTTER_ROOT/bin:$HOME/.pub-cache/bin
flutterfire bundle-service-file --plist-destination=${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app --build-configuration=${CONFIGURATION} --platform=ios --apple-project-path=${SRCROOT}

This works fine when I use the flutter tools, but fails if I try to use xcode to build my app (which I need to do sometimes, like for simulating for the VisionOS, since it's not supported yet by the flutter tools) the build fails.

I can build my app in xcode if I change the script to:

#!/bin/bash
PATH=${PATH}:$FLUTTER_ROOT/bin:$HOME/.pub-cache/bin:$HOME/.puro/shared/pub_cache/bin/
flutterfire bundle-service-file --plist-destination=${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app --build-configuration=${CONFIGURATION} --platform=ios --apple-project-path=${SRCROOT}

Basically adding the puro pub cache (since flutterfire is inside puro's pub cache), but I don't want to modify this script, since it's generated by the flutterfire_cli and it can change in the future. Also I don't want to have puro references in the project, since projects should be more independent of the dev's machine configurations.

It would be better if puro could symlink the default pub cache to it's pub cache.

commented

IMO the flutterfire CLI should just follow the semantics of the pub tool and use PUB_CACHE