Rank 2: Process
I tried it but it didnt work unfortunately
Votes
0
Replies
24
Participants
Unknown
Messages
25
Rank 2: Process
I tried it but it didnt work unfortunately
Admin
in dart you can have:
- helper
- lib
- first_helper.dart
- function1
- dependencies
- helper <---symlink
In the pubspec.yaml for function1 you would have:
dependencies:
dart_appwrite: ^7.1.0
helper:
path: dependencies/helper
Got you
Admin
ya, the Appwrite CLI will resolve the symlink and include it in the tar.gz
That's cool 
Rank 2: Process
Ahhh , I was hoping that
dependencies: dart_appwrite: ^7.1.0 helper: path: ../helperWould work out of the box. Is there a specific reason why it doesnt?
What OS You're using?
Admin
what byawitz said:
When deploying function to the cloud only the code inside the function folder will be deployed.
Rank 2: Process
Im using windows
Rank 2: Process
Locally, and linux for prod. Im not sure, are symlinks the same on both systems?
Not exactly.
You'll need to create symlink so for your example
Linux: inside any of your functions run
ln -s ../helper helperWindows: inside any of your functions run
mklink /d helper ../helperNotice that the target and source folder are the opposite parameter in each OS
That will create an helper folder within your function folder
Then update your yaml to:
dependencies: dart_appwrite: ^7.1.0 helper: path: helperIn linux it will work as Steven suggested, I won't be able to test in Windows dev environment right now, But it should work, try and let us know
Rank 2: Process
What im worried about is, that the symlink I created on a windows machine wont work when pushing it to github and pulling it onto my raspberry pi with linux
Rank 2: Process
I will try it out and let you know
Mmm make sense yes,
That part I've testes and seems to work
The first one created in linux environment and the second in windows
Both seems to be working
Rank 2: Process
It works! To be on the safe side, I created the symlink on my windows machine using WSL
Rank 2: Process
Via the linux command 😄

Great!
Rank 2: Process
[SOLVED] Share code across multiple functions
Rank 4: Virtual Machine
FYI: you can also adopt a monorepo/packaged repo vision to facilitate external code injection