Giter Site home page Giter Site logo

Comments (16)

kehh avatar kehh commented on July 28, 2024 1

We got bitten by this the other day - I thought there was some crazy dependency hell that was resulting in the downgrade to ElasticSearch. Thanks @axelvnk for picking this up.

My personal inclination for minimal confusion:

  • If people are installing from git, then they should be prepared / instructed to use composer and the vendor directory should be excluded from git.
  • If people are downloading the package from a release then this should include the vendor directory.
  • Having the vendor directory in VCS can result in time consuming merge conflicts of code that we're not familiar with.

Obviously other opinions are available and I'm certainly a fan of pragmatism over pedantry.

from providence.

collectiveaccess avatar collectiveaccess commented on July 28, 2024 1

Master now includes /vendor as it's a release. All other branches pull from composer.

from providence.

collectiveaccess avatar collectiveaccess commented on July 28, 2024 1

Yeah good point. We'll look into alternatives.

from providence.

inquisite avatar inquisite commented on July 28, 2024

We include vendor in Git and distributions because 95% of our users don't know about or want to know about Composer. You can delete the vendor dir and lock file and run it yourself of course.

from providence.

axelvnk avatar axelvnk commented on July 28, 2024

Yes, I just acknowledged that... But the version in composer.lock does not match the actual version that is included. Removing composer.lock and running composer install does solve the problem, but why would you have a composer.lock file in there anyway if you don't care about the actual version installed?

from providence.

inquisite avatar inquisite commented on July 28, 2024

Good point. We'll get rid of it.

from providence.

axelvnk avatar axelvnk commented on July 28, 2024

:D not what I meant. You SHOULD have it if you really want to have the vendor directory in there, but it MUST match the packages versions in the vendor directory. Just in case someone like me executes a composer install, that way the exact same versions that you're counting on are installed and used. And doesn't end up breaking stuff.

from providence.

inquisite avatar inquisite commented on July 28, 2024

Yeah, i know it needs to be there. I mean the incorrect one needs to go.

Kehan: I fully agree that having vendor/ in Git is ugly and annoying and just plain stupid. So long as you don't run composer on your install you won't have conflicts, but of course that's not really a solution. The issue for us is that a whole lot of people are running off of GitHub and are not inclined to, or capable of, dealing with composer. Our response to the resultant support headaches was simply to bring in copies of dependencies, first in app/lib/ and later in vendor/. This creates support headaches from people like you, but you are fewer in number :-)

In the short term this will have to remain as it is. In the medium term we will get rid of vendor/ and require composer use. We can hopefully mitigate some of the support issues with a simple script to do the composer install and initial run. This will dovetail with removal of most assets/ and replacement with NPM. Work on that is supposed to start this week.

from providence.

kehh avatar kehh commented on July 28, 2024

Ooohhh oooohhhh ohhhh. Exciting!

from providence.

axelvnk avatar axelvnk commented on July 28, 2024

As I suggested before, I think we can just include a composer.phar file and use it to execute a composer install from a PHP file. Like during setup.php or something.. That way the sitebuilders have no clue that some composer stuff is going on and we can still have our sweet sweet versioning 👍

from providence.

inquisite avatar inquisite commented on July 28, 2024

That would be nice, but quite a few of our users don't actually have command-line access to the system they install on. Maybe it can be triggered from setup.php. We'll see if that can work.

from providence.

collectiveaccess avatar collectiveaccess commented on July 28, 2024

The dev/metadataAlerts branch now has functioning auto-pull-from-composer mechanism. This branch is the develop branch with a couple of major changes beyond composer:

• Includes a "metadata alerts" feature that can send notifications triggered by modifications or dates/times
• Simplified setup.php format

http://clangers.collectiveaccess.org/jira/browse/PROV-2407

from providence.

jtreminio avatar jtreminio commented on July 28, 2024

A better solution to including /vendor in your repo is providing a packaged archive for end users that includes everything they need to get up and running with minimal interaction.

from providence.

dusta avatar dusta commented on July 28, 2024

@collectiveaccess This is very incorrect. Vendor should be removed from repo. There is many websites that allow you to download ready code witout composer. For example https://php-download.com/

from providence.

collectiveaccess avatar collectiveaccess commented on July 28, 2024

Vendor is only included for releases.

from providence.

dusta avatar dusta commented on July 28, 2024

@collectiveaccess But problem is that repo it gets huge by this. As I know you can include separate package in to release with builded application.
obraz

from providence.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.