Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

I have never seen anything fill up a vacuum so fast and still suck. -- Rob Pike, on X.


devel / comp.lang.php / [composer] duplicate vendor

SubjectAuthor
* [composer] duplicate vendorpaul
`* Re: [composer] duplicate vendorArno Welzel
 `* Re: [composer] duplicate vendorpaul
  `* Re: [composer] duplicate vendorArno Welzel
   `* Re: [composer] duplicate vendorpaul
    `* Re: [composer] duplicate vendorArno Welzel
     `* Re: [composer] duplicate vendorpaul
      `- Re: [composer] duplicate vendorpaul

1
[composer] duplicate vendor

<tknt3k$1bj$2@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=732&group=comp.lang.php#732

  copy link   Newsgroups: comp.lang.php
Path: i2pn2.org!i2pn.org!aioe.org!3udBC6ShDg3KaHy/T7q5Mw.user.46.165.242.75.POSTED!not-for-mail
From: sk@i.p (paul)
Newsgroups: comp.lang.php
Subject: [composer] duplicate vendor
Date: Sat, 12 Nov 2022 11:38:44 +0100
Organization: Aioe.org NNTP Server
Message-ID: <tknt3k$1bj$2@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="1395"; posting-host="3udBC6ShDg3KaHy/T7q5Mw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.4.2
Content-Language: it-IT
X-Notice: Filtered by postfilter v. 0.9.2
 by: paul - Sat, 12 Nov 2022 10:38 UTC

I state that my question is not mainly about php, but composer.

Here's the question ...

+ cat .config/composer/config.json
{ "repositories": {
"b": {
"type": "path",
"url": "$PWD/b"
},
"c": {
"type": "path",
"url": "$PWD/c"
}
}
}

+ cat a/composer.json
{ "require": {
"test/b": "^1.0"
}
}

+ cat b/composer.json
{ "name": "test/b",
"version": "1",
"require": {
"test/c": "^1.0"
}
}

+ cat c/composer.json
{ "name": "test/c",
"version": "1"
}

As you can see, only the *test/b* package requires the *test/c* package.
However, as you will see below, the *vendor/test/c* directory I find it
both under directory *b*, and under the directory *a*.

+ composer update --working-dir=b
+ composer update --working-dir=a
+ find | grep vendor/test/c
../b/vendor/test/c
../a/vendor/test/c

Can the directory *a* contains *vendor/test/c* be prevented?

-----BEGIN PGP MESSAGE-----

hQGMAyHa6HqE1N3qAQv+KYYFpZIEv8f+2NW2oSuvaVwYTJNGpU/w4sQNTVjrMkS7
gaqXzeyhD25Hgcgw844fWr4E0rW9OOrVu25/qz9QefpJUpzE+UQfwU0oDbWh/YvK
EEP61Nq0pFLrTojuA0rd0vVIRlQvbw4NdmLZlolUtdqaeqJNOe5HTW00gSL3g3GJ
LgwQpcixqZfvRvPeB5sMNzmgYKQsgQ3SNRgO2vFFavZNa/IBTcwIHTuh/WW/1+tc
NU1uNMUZyGPR6PM6MXTKWoRdS+L32WzrIaYd+zv92j9HnYM4zK/4ZzVO+Bfii0ni
XrnBF1RAn6XwzoUf1R9GncpVHJnkFw1HZ1naypcmbb/uX2wCyei35GZa6/QKQPWb
rxC5EG6o+Ry0+xaK9TZVWc5iFJ/WezufzoaAIL4yo8iXdcV/frD8252RKoDnx5qY
TMZKG1e181NYDqAIJRPQlwdGF3mMukyD7R7pDm+1RaUG9r0az4hQ7pt+OUyU0A70
IE5mnbr6G90nmfVRp/sK0oEBUKTvqP16qewTm9O+bxUA3jvgg8Mg93/6lTKLfOmC
K4wJ9+Op0fsBjMY1dbz/hrTIyYdiMPC5wYpvSmW8gN3O+AeFIs3DeRC2TanFS6Hw
+SZAIQFGLCz9aEZ4tLSZWioCFZsvWVTVJCv5E+1NEcgBIy7czVw0QaWhlHZsH+Nt
RB4=
=plmD
-----END PGP MESSAGE-----

Re: [composer] duplicate vendor

<jtcbceFaq6aU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=733&group=comp.lang.php#733

  copy link   Newsgroups: comp.lang.php
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: usenet@arnowelzel.de (Arno Welzel)
Newsgroups: comp.lang.php
Subject: Re: [composer] duplicate vendor
Date: Sun, 13 Nov 2022 14:56:30 +0100
Lines: 31
Message-ID: <jtcbceFaq6aU1@mid.individual.net>
References: <tknt3k$1bj$2@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Trace: individual.net 91cJ6VC7zoz6FF/o8X2AGwQ/OlFxU5N18A6zjp/EnBn7E3E2S3
Cancel-Lock: sha1:lMVaI/4Ejzga5L4G/6AAdhoxDGc=
Content-Language: de-DE
In-Reply-To: <tknt3k$1bj$2@gioia.aioe.org>
 by: Arno Welzel - Sun, 13 Nov 2022 13:56 UTC

paul, 2022-11-12 11:38:

> I state that my question is not mainly about php, but composer.
>
> Here's the question ...
>
> + cat .config/composer/config.json
[...]
> + cat a/composer.json
[...]
> + cat b/composer.json
[...]
> + cat c/composer.json
[...]
> As you can see, only the *test/b* package requires the *test/c* package.
> However, as you will see below, the *vendor/test/c* directory I find it
> both under directory *b*, and under the directory *a*.

Composer is not intended to be used this way. Usually you have exactly
*one* composer.json in your project and not multiple ones.

[...]
> -----BEGIN PGP MESSAGE-----

Why do you add PGP encrypted messages to your posts?

--
Arno Welzel
https://arnowelzel.de

Re: [composer] duplicate vendor

<tkviks$be6$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=734&group=comp.lang.php#734

  copy link   Newsgroups: comp.lang.php
Path: i2pn2.org!i2pn.org!aioe.org!3udBC6ShDg3KaHy/T7q5Mw.user.46.165.242.75.POSTED!not-for-mail
From: sk@i.p (paul)
Newsgroups: comp.lang.php
Subject: Re: [composer] duplicate vendor
Date: Tue, 15 Nov 2022 09:29:15 +0100
Organization: Aioe.org NNTP Server
Message-ID: <tkviks$be6$1@gioia.aioe.org>
References: <tknt3k$1bj$2@gioia.aioe.org> <jtcbceFaq6aU1@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="11718"; posting-host="3udBC6ShDg3KaHy/T7q5Mw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.4.2
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: it-IT
 by: paul - Tue, 15 Nov 2022 08:29 UTC

Il 13/11/22 14:56, Arno Welzel ha scritto:
> Composer is not intended to be used this way. Usually you have exactly
> *one* composer.json in your project and not multiple ones.

A, B, and C would be three distinct projects (packages) IHMO, each with
their respective composer.json
What do you mean?

Re: [composer] duplicate vendor

<jthcphF5hp8U1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=735&group=comp.lang.php#735

  copy link   Newsgroups: comp.lang.php
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!lilly.ping.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: usenet@arnowelzel.de (Arno Welzel)
Newsgroups: comp.lang.php
Subject: Re: [composer] duplicate vendor
Date: Tue, 15 Nov 2022 12:51:14 +0100
Lines: 22
Message-ID: <jthcphF5hp8U1@mid.individual.net>
References: <tknt3k$1bj$2@gioia.aioe.org> <jtcbceFaq6aU1@mid.individual.net>
<tkviks$be6$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Trace: individual.net S9sRRsDB+hv5w37Q0CsxtwXw0tL+TUcNZKfQmTy0pmndTVYstt
Cancel-Lock: sha1:GZ2Sr9VTeOBUIezqQlmVU3UfC/Y=
Content-Language: de-DE
In-Reply-To: <tkviks$be6$1@gioia.aioe.org>
 by: Arno Welzel - Tue, 15 Nov 2022 11:51 UTC

paul, 2022-11-15 09:29:

> Il 13/11/22 14:56, Arno Welzel ha scritto:
>> Composer is not intended to be used this way. Usually you have exactly
>> *one* composer.json in your project and not multiple ones.
>
> A, B, and C would be three distinct projects (packages) IHMO, each with
> their respective composer.json

In that case your question makes no sense:

"Can the directory *a* contains *vendor/test/c* be prevented?"

If a, b and c are independent projects they won't influence each other.
However if they are part of one single project then there must not be a
"local" composer.json, because Composer is not intended to be used as a
"local" package manager inside a package.

--
Arno Welzel
https://arnowelzel.de

Re: [composer] duplicate vendor

<tl004t$pmi$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=736&group=comp.lang.php#736

  copy link   Newsgroups: comp.lang.php
Path: i2pn2.org!i2pn.org!aioe.org!3udBC6ShDg3KaHy/T7q5Mw.user.46.165.242.75.POSTED!not-for-mail
From: sk@i.p (paul)
Newsgroups: comp.lang.php
Subject: Re: [composer] duplicate vendor
Date: Tue, 15 Nov 2022 13:19:41 +0100
Organization: Aioe.org NNTP Server
Message-ID: <tl004t$pmi$1@gioia.aioe.org>
References: <tknt3k$1bj$2@gioia.aioe.org> <jtcbceFaq6aU1@mid.individual.net>
<tkviks$be6$1@gioia.aioe.org> <jthcphF5hp8U1@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="26322"; posting-host="3udBC6ShDg3KaHy/T7q5Mw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.4.2
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: it-IT
 by: paul - Tue, 15 Nov 2022 12:19 UTC

Il 15/11/22 12:51, Arno Welzel ha scritto:
> "local" composer.json

????

Re: [composer] duplicate vendor

<jthh3tF630dU3@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=737&group=comp.lang.php#737

  copy link   Newsgroups: comp.lang.php
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.mixmin.net!news2.arglkargh.de!news.karotte.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: usenet@arnowelzel.de (Arno Welzel)
Newsgroups: comp.lang.php
Subject: Re: [composer] duplicate vendor
Date: Tue, 15 Nov 2022 14:05:03 +0100
Lines: 23
Message-ID: <jthh3tF630dU3@mid.individual.net>
References: <tknt3k$1bj$2@gioia.aioe.org> <jtcbceFaq6aU1@mid.individual.net>
<tkviks$be6$1@gioia.aioe.org> <jthcphF5hp8U1@mid.individual.net>
<tl004t$pmi$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Trace: individual.net g6DziRJIb7F/VHrmm2u6rgmZ/t7xhQ58+kpuCU/EPva2K4Jq5j
Cancel-Lock: sha1:nf8LFRlaoFN6N7zpjG3vGPUsdCg=
Content-Language: de-DE
In-Reply-To: <tl004t$pmi$1@gioia.aioe.org>
 by: Arno Welzel - Tue, 15 Nov 2022 13:05 UTC

paul, 2022-11-15 13:19:

> Il 15/11/22 12:51, Arno Welzel ha scritto:
>> "local" composer.json
>
> ????

From your original post:

+ cat a/composer.json
+ cat b/composer.json
+ cat c/composer.json

So either you have three separate projects "a", "b" and "c" which each
use Composer *or* you have one project with the packages "a", "b" and
"c" - but then you should also only have *one* composer.json for your
project and treat a, b and c just as parts of your project.

--
Arno Welzel
https://arnowelzel.de

Re: [composer] duplicate vendor

<tl07pa$f6k$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=738&group=comp.lang.php#738

  copy link   Newsgroups: comp.lang.php
Path: i2pn2.org!i2pn.org!aioe.org!3udBC6ShDg3KaHy/T7q5Mw.user.46.165.242.75.POSTED!not-for-mail
From: sk@i.p (paul)
Newsgroups: comp.lang.php
Subject: Re: [composer] duplicate vendor
Date: Tue, 15 Nov 2022 15:30:02 +0100
Organization: Aioe.org NNTP Server
Message-ID: <tl07pa$f6k$1@gioia.aioe.org>
References: <tknt3k$1bj$2@gioia.aioe.org> <jtcbceFaq6aU1@mid.individual.net>
<tkviks$be6$1@gioia.aioe.org> <jthcphF5hp8U1@mid.individual.net>
<tl004t$pmi$1@gioia.aioe.org> <jthh3tF630dU3@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="15572"; posting-host="3udBC6ShDg3KaHy/T7q5Mw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.4.2
Content-Language: it-IT
X-Notice: Filtered by postfilter v. 0.9.2
 by: paul - Tue, 15 Nov 2022 14:30 UTC

Il 15/11/22 14:05, Arno Welzel ha scritto:
> paul, 2022-11-15 13:19:
>
>> Il 15/11/22 12:51, Arno Welzel ha scritto:
>>> "local" composer.json
>>
>> ????
>
> From your original post:
>
> + cat a/composer.json
> + cat b/composer.json
> + cat c/composer.json
>
> So either you have three separate projects "a", "b" and "c" which each
> use Composer *or* you have one project with the packages "a", "b" and
> "c" - but then you should also only have *one* composer.json for your
> project and treat a, b and c just as parts of your project.

Bah... it will be like you say... maybe...
Anyway look a little what I did

Il 12/11/22 11:38, paul ha scritto:
> + cat b/composer.json
> {
> "name": "test/b",
> "version": "1",
> "require": {
> "test/c": "^1.0"
> }
> }

$ cat new-composer.json
{ "config": {
"vendor-dir": "internal-vendor"
},
"name": "test/b",
"version": "1",
"require": {
"test/c": "^1.0"
}
} $ mv new-composer.json b/composer.json
$ find b -name *vendor*
b/vendor
$ composer update --working-dir=b
$ find b -name *vendor*
b/vendor
b/internal-vendor
$ rm -rf b/vendor
$ find b -name *vendor*
b/internal-vendor

OK!!!!!!

Il 12/11/22 11:38, paul ha scritto:
> + find | grep vendor/test/c
> ./b/vendor/test/c
> ./a/vendor/test/c

$ find | grep vendor/test/c
../b/internal-vendor/test/c
../a/vendor/test/c
$ find | grep vendor/test/c | grep -v internal-vendor
../a/vendor/test/c

It seems that it is fine.

Re: [composer] duplicate vendor

<tlfegr$123s$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=752&group=comp.lang.php#752

  copy link   Newsgroups: comp.lang.php
Path: i2pn2.org!i2pn.org!aioe.org!3udBC6ShDg3KaHy/T7q5Mw.user.46.165.242.75.POSTED!not-for-mail
From: sk@i.p (paul)
Newsgroups: comp.lang.php
Subject: Re: [composer] duplicate vendor
Date: Mon, 21 Nov 2022 09:56:59 +0100
Organization: Aioe.org NNTP Server
Message-ID: <tlfegr$123s$1@gioia.aioe.org>
References: <tknt3k$1bj$2@gioia.aioe.org> <jtcbceFaq6aU1@mid.individual.net>
<tkviks$be6$1@gioia.aioe.org> <jthcphF5hp8U1@mid.individual.net>
<tl004t$pmi$1@gioia.aioe.org> <jthh3tF630dU3@mid.individual.net>
<tl07pa$f6k$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="34940"; posting-host="3udBC6ShDg3KaHy/T7q5Mw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.4.2
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: it-IT
 by: paul - Mon, 21 Nov 2022 08:56 UTC

Il 15/11/22 15:30, paul ha scritto:
> ...

Any comments?
Like, do not like?

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor