Comments (7)
Via @viktorbenei https://github.com/steplib/steplib/issues/68
from fastlane.
Hmm, I'm not sure actually. I personally don't think there is anything wrong with either approach. I do like the flexibility that the fastlane context can hold any object 😇
from fastlane.
How about just shadowing the ENV variables in the lane context? This wouldn't sacrifice the lane context's flexibility and would also remove the need to use both everywhere.
from fastlane.
How would that handle complex objects in the fastlane
context?
from fastlane.
The "new" lane context I'm proposing would have the following logic on key lookup:
- Look up the key in the lane context's Hash
- If there was an object returned, return that
- Look up the key in ENV
- Return the result of that
The complex objects would just be stored in the Hash (and could even overwrite values from ENV)
from fastlane.
I like what @milch proposes and I'm not that deeply involved with fastlane tools so far, one thing to consider (based on our project @KrauseFx linked) is how much you care about integration with other tools. What we try to solve with the https://github.com/steplib/steplib project is to connect tools no matter what technology it's built with (can be a bash script, ruby, Go, binary, ...). In that case you just can't use a language specific mechanism for sharing parameters / context.
Generally though you probably won't be able to provide a truly "no wrapper required" solution especially if you want to support existing tools, so I think the parameter passing/context just have to support a unified mechanism for which others can write thin wrappers.
For example we have Steps (tools / components) which basically just expose an interface for an existing tool, and the actual Step code is nothing but a really thin wrapper which transforms the inputs from our interface format (we only use environment variables) to the format the actual tool uses (writes a config file or calls the tool with command line parameters).
Sidenote: we handle complex parameters through the filesystem.
I think the format of the context is less important and that the biggest issue is actually handling tool output collisions, when you run the same tool (or two tools which generate into the same output, be it a context, environment or anything else) multiple times and so only the last output will be actually available. It's even more crucial in case a tool/Step creates multiple outputs but might not export all every time it runs.
A minimalistic example is if a tool/step generates both a success state (true or false) and an optional error message output. If the tool first runs and fails it will generate an error message output. If you run it again and it finishes with success then it will probably only generate the state output but not the error message one, so you can end up with a context where the tool's "state" is "success" but an error message will still be available.
Our best solution so far is the one @KrauseFx linked (https://github.com/steplib/steplib/issues/68) but it's not yet tested and it requires a central tool with which other tools communicate. Our plan at the moment is to have a CLI tool installed in a specific path / made available to other tools and so other tools (rather the wrappers around the tools) will communicate exactly with that specific CLI tool to store generated outputs and the CLI tool manages the aliasing of the outputs in a similar way as Docker environment binding works but we're still discussing the pros&cons of this system with our team.
from fastlane.
Thanks everyone for the feedback, I'll close this issue for now and won't change how fastlane
handles the environment.
from fastlane.
Related Issues (20)
- Fast lane is failing to select Apple Watch if it's paired with phone in `run_tests`
- Update xcodeproj to latest version 1.125.0 to fix CVE and newer Xcode errors HOT 1
- `upload_symbols_to_crashlytics` ending with `Shell command exited with exit status instead of 0.`
- `Remind user about posting their fastlane env` failed HOT 1
- [__NSArrayM insertObject:atIndex:]: object cannot be nil (-1010) HOT 1
- i am unable to publish app to AppStore HOT 1
- Seems to be a very old project file format - please open your project file in a more recent version of Xcode HOT 1
- Error: Unknown option '--path' when running swiftlint(params) HOT 3
- Method missing
- Screenshot upload issue
- IOS fastlane dev error HOT 1
- ANSI text formatting missing for 'Summary for supply' heading in console output HOT 1
- [!] Permission denied - /.../gradlew (Errno::EACCES)
- How to call fastlane actions/functions from inside a Ruby module/class HOT 1
- [!] Google Api Error: Invalid request - You must let us know whether your app includes any health features HOT 5
- Xcode 16 | fastlane | scan `run_rosetta_simulator` no longer works HOT 1
- Using cert requires storing your FileVault2 encryption key in a less secure way HOT 1
- Apple Corporation Account and "503 Service Temporarily Unavailable" HOT 1
- Sign is NOT spelled 'sigh' HOT 4
- CircleCI PR swift check fails with error: outdated Homebrew version HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastlane.