berkshelf unable to resolve chained git dependency - berkshelf

C:\git\test (master) × berks --version
7.0.8
I have an issue with Berkshelf resolving chained git dependencies.
I have a test cookbook I generated to narrow down the issue, this cookbook depends on the cookbook windows-automation via a git reference.
test Berksfile
# frozen_string_literal: true
source 'https://supermarket.chef.io'
cookbook 'win-telegraf', path: '../win-telegraf/'
cookbook 'windows-automation', '~> 0.4.0', git: 'git#git.osky.io:ops/chef-windows-automation.git', branch: 'master'
# cookbook 'windows-library', '~> 0.1.0', git: 'git#git.osky.io:ops/chef-windows-library.git', branch: 'master'
metadata
test metadata.rb
depends 'win-telegraf'
depends 'windows-automation', '~> 0.4.0'
# depends 'windows-library', '~> 0.1.0'
windows-automation depends on windows-library via another git reference
windows-automation Berksfile
source 'https://supermarket.chef.io'
metadata
cookbook 'powershell', '~> 6.1.3'
cookbook 'windows', '~> 4.2.5'
# cookbook 'windows-library', path: '../chef-windows-library'
cookbook 'windows-library', '~> 0.1.0', git: 'git#git.osky.io:ops/chef-windows-library.git', branch: 'master'
windows-automation metadata
supports 'windows'
depends 'powershell', '~> 6.1.3'
depends 'windows-library', '~> 0.1.0'
This issue comes when I try to run berks install for the test cookbook. I get the following output
C:\git\test (master) × berks install
Resolving cookbook dependencies...
Fetching 'test' from source at .
Fetching 'win-telegraf' from source at ../win-telegraf
Fetching 'windows-automation' from git#git.osky.io:ops/chef-windows-automation.git (at master)
Fetching cookbook index from https://supermarket.chef.io...
Unable to satisfy constraints on package windows-library, which does not exist, due to solution constraint (test = 0.1.0). Solution constraints that may result in a constraint on windows-library: [(test = 0.1.0) -> (windows-automation = 0.4.0) -> (windows-library >= 0.0.0)], [(windows-automation = 0.4.0) -> (windows-library >= 0.0.0)]
Missing artifacts: windows-library
Demand that cannot be met: (test = 0.1.0)
Unable to find a solution for demands: test (0.1.0), win-telegraf (0.1.0), windows-automation (0.4.0)
This issue gets resolved if in the test cookbook I add a dependency to windows-library. But I am wondering why berkshelf cannot resolve this without the dependency. I feel like I should not need to explicitly depend on all transative git dependencies.

Known issue with berkshelf that is marked as wontfix.
https://github.com/berkshelf/berkshelf/issues/1829

Related

Flutter firebase version conflict firebase messaging

I have a firebase flutter app, everything worked, but when I added firebase_messaging: ^5.1.4. The app gives this:
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:preDebugBuild'.
> In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[18.0.
0]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.google.firebase:firebase-messaging:18.0.0 -> com.google.firebase:firebase-iid#[18.0.0], but fire
base-iid version was 19.0.0.
The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends on project 'firebase_messaging' which depends onto com.google.firebase:firebase-messaging#18.0.
0
-- Project 'app' depends onto com.google.firebase:firebase-core#17.0.0
-- Project 'app' depends on project 'cloud_functions' which depends onto com.google.firebase:firebase-functions#17.0.0
-- Project 'app' depends on project 'firebase_core' which depends onto com.google.firebase:firebase-core#16.0.9
For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b
uild.gradle file.
These are my other packages
firebase_auth: ^0.11.1+12
firebase_storage: ^3.0.4
cloud_firestore: ^0.12.7+1
cloud_functions: ^0.4.1+1
(they all work)
I have this in my build gradle: classpath 'com.google.gms:google-services:4.2.0'
implementation 'com.google.firebase:firebase-core:17.0.0'
Is there a way of fixing this?
Thank you very much!
I'm currently trying this:
in the app level build.gradle I have this:
apply plugin: 'com.google.gms.google-services'
I'm adding this:
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
(after apply plugin: 'com.google.gms.google-services')
Include Firebase Core dependency in pub spec.yaml and not specifying the versions of firebase dependencies resolve most of the issues.
https://pub.dev/packages/firebase_core
run these two lines
rm Podfile.lock
pod install --repo-update
these will does the job. it took my two days to fix it

How do I solve pod install error in terminal?

I’ve added a new pod to my already existing podfile which worked perfectly and I wrote pod install in Terminal . It starts installing but when generating pods project is says ‘oh ,no an error occurred’ and now my project fails to build .
Analyzing dependencies
Downloading dependencies
Using BoringSSL-GRPC (0.0.3)
Using Firebase (6.6.0)
Using FirebaseAnalytics (6.1.0)
Using FirebaseAuth (6.2.2)
Using FirebaseAuthInterop (1.0.0)
Using FirebaseCore (6.2.0)
Using FirebaseCoreDiagnostics (1.0.0)
Using FirebaseCoreDiagnosticsInterop (1.0.0)
Using FirebaseDatabase (6.0.0)
Using FirebaseFirestore (1.4.3)
Using FirebaseInstanceID (4.2.3)
Using GTMSessionFetcher (1.2.2)
Using GoogleAppMeasurement (6.1.0)
Using GoogleDataTransport (1.0.0)
Using GoogleDataTransportCCTSupport (1.0.0)
Using GoogleUtilities (6.2.4)
Using Protobuf (3.9.0)
Using gRPC-C++ (0.0.9)
Using gRPC-Core (1.21.0)
Using leveldb-library (1.20)
Using nanopb (0.3.901)
Generating Pods project
Integrating client project
――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
Command
/usr/local/bin/pod install
Report
What did you do?
What did you expect to happen?
What happened instead?
Stack
CocoaPods : 1.7.5
Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
RubyGems : 3.0.3
Host : Mac OS X 10.15 (19A526h)
Xcode : 11.0 (11M382q)
Git : git version 2.21.0 (Apple Git-122)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git # 86c8d2a54cdff44b97176caed26d7d52378c1143
Plugins
cocoapods-deintegrate : 1.0.4
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.1.0
cocoapods-trunk : 1.3.1
cocoapods-try : 1.1.0
Podfile
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'Do It !' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for Do It !
target 'Do It !Tests' do
inherit! :search_paths
# Pods for testing
end
target 'Do It !UITests' do
inherit! :search_paths
# Pods for testing
end
pod 'Firebase/Analytics'
pod 'Firebase/Auth'
pod 'Firebase/Core'
pod 'Firebase/Firestore'
pod 'Firebase/Database'
end
Error
RuntimeError - Developer workspace file reference type is not yet supported (Pods/Pods.xcodeproj)
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.11.0/lib/xcodeproj/workspace/file_reference.rb:72:in `absolute_path'
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.11.0/lib/xcodeproj/workspace.rb:203:in `block in load_schemes'
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.11.0/lib/xcodeproj/workspace.rb:202:in `each'
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.11.0/lib/xcodeproj/workspace.rb:202:in `load_schemes'
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.11.0/lib/xcodeproj/workspace.rb:85:in `from_s'
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.11.0/lib/xcodeproj/workspace.rb:66:in `new_from_xcworkspace'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.7.5/lib/cocoapods/installer/user_project_integrator.rb:102:in `create_workspace'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.7.5/lib/cocoapods/installer/user_project_integrator.rb:71:in `integrate!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.7.5/lib/cocoapods/installer.rb:780:in `block in integrate_user_project'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.7.5/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.7.5/lib/cocoapods/installer.rb:776:in `integrate_user_project'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.7.5/lib/cocoapods/installer.rb:161:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.7.5/lib/cocoapods/command/install.rb:51:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.7.5/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.7.5/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=Developer+workspace+file+reference+type+is+not+yet+supported+%28Pods%2FPods.xcodeproj%29&type=Issues
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
Looking for related issues on cocoapods/cocoapods...
Found no similar issues. To create a new issue, please visit:
https://github.com/cocoapods/cocoapods/issues/new
[!] Automatically assigning platform ios with version 12.4 on target Do It ! because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform.

Berks install on cookbook cannot find itself

I have started using Berkshelf, it seems to make sense, but I can't wrap my head around how it should work.
First I created a cookbook using berks cookbook mycookbook. Then I added a dependency to only find that it cannot find mycookbook when I run berks install
So it seems that mycookbook (which is version 0.1.0) depends on default on mycookbook version 0.1.0. Why should mycookbook depend on mycookbook?
Unable to satisfy constraints on package java due to solution constraint (mycookbook = 0.1.0). Solution constraints that may result in a constraint on java: [(mycookbook = 0.1.0) -> (java ~> 1.31.1)]
Demand that cannot be met: (mycookbook = 0.1.0)
Artifacts for which there are conflicting dependencies: java = 1.31.0 -> []Unable to find a solution for demands: mycookbook (0.1.0)
It seems you get this message if you create a cookbook that already exists? I'm not sure. But after renaming it the message is gone.

Composer.phar update now results in an ErrorException for MonologBundle

symfony/symfony v2.2.0
monolog/monolog v1.4.1
After running composer.phar update yesterday, monolog was updated; running the same command today results in the following error message:
Loading composer repositories with package information
Updating dependencies (including require-dev)
Generating autoload files
[ErrorException]
Warning: constant(): Couldn't find constant Monolog\Logger::DEBUG in [path]\vendor\symfony\monolog-bundle\Symfony\Bundle\MonologBundle\DependencyInjection\MonologExtension.php line 109
The (i think) relevant part of config_dev.yml
monolog:
handlers:
main:
type: stream
path: %kernel.logs_dir%/%kernel.environment%.log
level: debug
firephp:
type: firephp
level: info
Did something change that requires additional configuration, or is something else happening ?
Monolog recently switch to PSR-4 compatible autoloading. Possibly, the
version of Composer you're running is too old for that. Please run
composer self-update first and try to update your dependencies again.
Sounds like the update didn't go well - do you have a Logger class in vendor/monolog/monolog/src/Monolog/Logger.php? If not I would suggest deleting the vendor/monolog dir and running composer install to get it back.
I had this same thing, but for Laravel.
I solved it by creating the app/storage folder and all it's sub-folders and files.
I get them by creating a new empty project, and just a copy-paste !
Woking now...
Here is the file structure:
app/storage/cache
app/storage/logs
app/storage/meta
app/storage/sessions
app/storage/views
You can ignore this folder for your repository.

Problem migrating w/ sqlite3, receive error message-> undefined method `prerequisites' for nil:NilClass

I'm working on the RoR3 Tutorial and i'm on chapter 6 when I tried the rakedb:migrate command. I received the message:
rake aborted!
undefined method `prerequisites' for nil:NilClass
I ignored the changes to the Gemfile because it already was installing sqlite3. When I changed it to 'sqlite3-ruby', '1.2.5' :required => 'sqlite3', i got an ActiveRecord::ConnectionNotEstablished message when trying to view the page locally. So, I just decided to not make that change.
I am using lion os, ruby 1.9.2p290, rails 3.1.0.rc8. Thx!
I'm working on the same tutorial at the moment, and ran into the same issue. After some digging, it turns out this is a bug with rspec-rails. If you look at rpsec-rails' change log for 2.6.1
guard against calling prerequisites on nil default rake task (Jack
Dempsey)
the book also doesn't get a chance to go into detail on what's going on when you run "bundle install", turns out bundler is meant to solve application dependencies: http://gembundler.com/rationale.html
Anyway, this was the solution: https://github.com/rails/rails/issues/1723
Change 'rspec-rails' under :development in your gemfile to:
gem 'rspec-rails', '2.6.1.beta1'
and 'rspec' under :test to
gem 'rspec', '2.6'
worked for me. Let me know if you want to work through the book together!

Resources