Comments (7)
@rakaramos @ZevEisenberg A solution needs to be provided for this problem that will be happening on every muter run on SPM with at least one dependency. With that in mind, I want your opinion on implementing the following solution:
The developer will have the ability to provide environment variables through muter configuration. So in this Usecase the user would give the following env var and we would would set it like this which will solve the problem.
process.environment = ["PATH": "/usr/local/bin:/usr/bin:/bin"] // Found this from swift forumsThat way not only will we solve this problem but we will also give the ability to developer to set env vars which may be needed.
What do you think about this?
Thanks for the investigation!
I think that a better approach is to copy all the env vars from the process info to the underlying muter process, I'll run a few tests and will issue a PR if it fixes it.
from muter.
Hello @gsl-anthonymerle
Thank you for taking the time to report this issue I will take a look at it later
from muter.
My pleasure, thanks @Nikoloutsos
from muter.
@gsl-anthonymerle Your code helped reproduce the issue.
At first, I tried running without any SPM dependencies and it was working but whenever I added at least one SPM dependency it was always failing.
The problem looks like is that swift test
tries to resolve the packages but Github refuses to provide it.
After some debugging I found this on swift forum which explains the problem.
Workaround:
Change the Package.swift to use SSH authentication:
dependencies: [
.package(
- url: "https://github.com/approvals/ApprovalTests.Swift",
+ url: "[email protected]:approvals/ApprovalTests.Swift.git"
branch: "master"
),
],
In the future I will try to fix this so that muter is running seamlessly on SPM packages with dependencies.
🎁 Bonus tip:
There is no need for you to exclude the Package.swift on the configuration since it is excluded by default. This was added in latest commit d44e78d
from muter.
@rakaramos @ZevEisenberg
A solution needs to be provided for this problem that will be happening on every muter run on SPM with at least one dependency.
With that in mind, I want your opinion on implementing the following solution:
The developer will have the ability to provide environment variables through muter configuration.
So in this Usecase the user would give the following env var and we would would set it like this which will solve the problem.
process.environment = ["PATH": "/usr/local/bin:/usr/bin:/bin"] // Found this from swift forums
That way not only will we solve this problem but we will also give the ability to developer to set env vars which may be needed.
What do you think about this?
from muter.
Hi @Nikoloutsos,
Thank you for your answer 🙏 Unfortunately, changing the http url to a git one doesn't change much, and I now get the following error:
Fetching [email protected]:approvals/ApprovalTests.Swift.git from cache
warning: 'approvaltests.swift': skipping cache due to an error: Couldn’t fetch updates from remote repositories:
Fetching [email protected]:approvals/ApprovalTests.Swift.git from cache
warning: 'approvaltests.swift': skipping cache due to an error: Couldn’t fetch updates from remote repositories:
error: Failed to clone repository [email protected]:approvals/ApprovalTests.Swift.git:
Is it something you ran into as well ?
Side note: I was using the Homebrew version, but I think it doesn't ship the latest changes that you talked before (like automatically ignoring Package.swift etc.), so I have now installed muter from the git repository
from muter.
Hello @gsl-anthonymerle 👋
Sorry for the late response, I just came back from holidays 😄
IIRC it was working fine for me, have you setup ssh for Github?
Probably now if you run the following on your terminal it is going to fail.
git clone [email protected]:gsl-anthonymerle/MuterPackageFailure.git
Take a look here and here on how you can generate an SSH key and add it into Github.
from muter.
Related Issues (20)
- Migrate to versioned formulae (homebrew)
- Cannot write to file when run from Xcode 15 HOT 4
- Error: Could not parse buildRequest.json from build description path HOT 7
- Add Linux support HOT 2
- Use coverage to short-circuit mutation HOT 2
- Improve schemata testing HOT 2
- [Error]Swift/StringCharacterView.swift:158 Fatal error: String index is out of bounds HOT 7
- Reconsider defaultExcludeList values to be more specific HOT 3
- Muter discovered 0 mutants in 0 files or wrongfully fails tests when running on a new project with default config HOT 3
- RemoveSideEffectsOperator doesn't check for implicit return scenario HOT 4
- ApplySchemata step doesn't generate formatted code HOT 4
- Could not parse buildRequest.json from build description path HOT 1
- Run mutations in parallel HOT 2
- Homebrew version of Muter very broken HOT 1
- Support xcodebuild as an executable for SPM projects HOT 2
- AcceptanceTests fail locally when using Sonoma 14.4.1 + Xcode 15.2 HOT 1
- Muter hangs when mutation change causes test hang HOT 6
- Wrong results mutating HOT 8
- Error Running Muter Version 16 with Xcode 15 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 muter.