This is an automated email from the ASF dual-hosted git repository. sjanc pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-newt.git
commit 5e20acaa52ad4ce285142e464b42d4f02188e228 Author: Szymon Janc <[email protected]> AuthorDate: Fri Oct 16 17:22:57 2026 +0200 newt: Test that only dependencies of required versions are loaded Add dummy repo 06 whose dependencies differ between versions: 1.0.0 depends on repo 04, while master and 2.0.0 depend on repo 05. The version-deps project requires repo 06 2.0.0, so repo 04 must not be cloned. This covers 1f565a446 ("newt/project: Load only repo dependencies of required versions"), which no test detected reverting. Assisted-by: Claude:claude-opus-5-5 --- .../upgrade/dummy-repos/mynewt-dummy-repo-06.fi | 131 +++++++++++++++++++++ .../upgrade/success/version-deps/expected.txt | 2 + .../upgrade/success/version-deps/project.yml | 26 ++++ 3 files changed, 159 insertions(+) diff --git a/newt/testdata/upgrade/dummy-repos/mynewt-dummy-repo-06.fi b/newt/testdata/upgrade/dummy-repos/mynewt-dummy-repo-06.fi new file mode 100644 index 00000000..6ae271f1 --- /dev/null +++ b/newt/testdata/upgrade/dummy-repos/mynewt-dummy-repo-06.fi @@ -0,0 +1,131 @@ +blob +mark :1 +data 102 +# mynewt-dummy-repo-06 + +Dummy repo for newt upgrade tests. Its dependencies differ between +versions. + +reset refs/tags/mynewt_1_0_0_tag +commit refs/tags/mynewt_1_0_0_tag +mark :2 +author Szymon Janc <[email protected]> 1792152000 +0000 +committer Szymon Janc <[email protected]> 1792152000 +0000 +data 13 +first commit +M 100644 :1 README.md + +blob +mark :3 +data 1104 +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +repo.name: mynewt-dummy-repo-06 +repo.versions: + "0.0.0": "master" + "1.0.0": "mynewt_1_0_0_tag" + + "0-dev": "0.0.0" + +repo.deps: + mynewt-dummy-repo-04: + type: git + url: https://dummy.invalid/mynewt-dummy-repo-04.git + vers: + master: 0.0.0 + mynewt_1_0_0_tag: 1.0.0 + +commit refs/tags/mynewt_1_0_0_tag +mark :4 +author Szymon Janc <[email protected]> 1792152060 +0000 +committer Szymon Janc <[email protected]> 1792152060 +0000 +data 6 +1.0.0 +from :2 +M 100644 :3 repository.yml + +blob +mark :5 +data 1482 +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +repo.name: mynewt-dummy-repo-06 +repo.versions: + "0.0.0": "master" + "1.0.0": "mynewt_1_0_0_tag" + "2.0.0": "mynewt_2_0_0_tag" + + "0-dev": "0.0.0" + +# Version 2.0.0 replaced the dependency on repo 04 with repo 05. master +# requires a version of repo 05 other than its master, so that a skipped +# dependency is not hidden by a fresh clone. +repo.deps: + mynewt-dummy-repo-04: + type: git + url: https://dummy.invalid/mynewt-dummy-repo-04.git + vers: + mynewt_1_0_0_tag: 1.0.0 + + mynewt-dummy-repo-05: + type: git + url: https://dummy.invalid/mynewt-dummy-repo-05.git + vers: + master: 1.0.0 + mynewt_2_0_0_tag: 2.0.0 + +commit refs/heads/master +mark :6 +author Szymon Janc <[email protected]> 1792152120 +0000 +committer Szymon Janc <[email protected]> 1792152120 +0000 +data 6 +2.0.0 +from :4 +M 100644 :5 repository.yml + +tag mynewt_2_0_0_tag +from :6 +tagger Szymon Janc <[email protected]> 1792152120 +0000 +data 17 +mynewt_2_0_0_tag + +tag mynewt_1_0_0_tag +from :4 +tagger Szymon Janc <[email protected]> 1792152060 +0000 +data 17 +mynewt_1_0_0_tag + diff --git a/newt/testdata/upgrade/success/version-deps/expected.txt b/newt/testdata/upgrade/success/version-deps/expected.txt new file mode 100644 index 00000000..a73677b5 --- /dev/null +++ b/newt/testdata/upgrade/success/version-deps/expected.txt @@ -0,0 +1,2 @@ + * mynewt-dummy-repo-05: 762d7da4ac4fc34df941b99fc0c57a030e5b1833, 2.0.0 + * mynewt-dummy-repo-06: 87674f20557cf2bc2597b3b1284a3a5f0c92338c, 2.0.0 diff --git a/newt/testdata/upgrade/success/version-deps/project.yml b/newt/testdata/upgrade/success/version-deps/project.yml new file mode 100644 index 00000000..73d69745 --- /dev/null +++ b/newt/testdata/upgrade/success/version-deps/project.yml @@ -0,0 +1,26 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +### repo-06 depends on repo-04 only in version 1.0.0, it must not be +### installed. + +repository.mynewt-dummy-repo-06: + type: git + vers: 2.0.0 + url: 'https://dummy.invalid/mynewt-dummy-repo-06.git'
