Repository navigation
Revert "refactor: drop the package name check" - #43
Merged
Merged
Conversation
The check was dropped in #42 as redundant with the harness resolving the student package by name, and reverted. The note keeps the measurements that settle it, so the argument does not have to be rediscovered: php and python libraries do resolve by name and fail on a mismatch, javascript does not — npm installs a path dependency under the key of the dependency, whatever the package calls itself. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Возвращает
checkPackageName, снятый в #42.Почему откат
Довод #42 был в том, что имя резолвит по имени сам харнесс проекта, и отдельная проверка только дублирует установку. Довод верен не везде.
composer.jsonтребуетhexlet/codeиз path-репозитория, composer падает сам.[tool.uv.sources]объявляетhexlet-code = { path = "code" }, uv отказывает сPackage metadata name … does not match given name."@hexlet/code": "file:code", и npm ставит path-зависимость под ключом зависимости, как бы пакет ни назвался сам. Проверено и наinstall, и наci: пакет с именемwrong-nameвстаёт вnode_modules/@hexlet/code, импорт резолвится, тесты зелёные. Здесь эта проверка — единственное, что держит имя.Плюс видимость: отказ резолвера случается внутри
make setup, поэтому его текст лежит в середине лога, а последняя строка говорит про код возврата docker. Проверка имени падает раньше и называет причину.Дальше
hexlet.code:app), go (module code) и ruby (hexlet_code) — конвенция там та же, аmappingо ней не знает;AGENTS.mdполучил запись о том, почему проверка остаётся, с замерами: чтобы довод не пришлось выяснять заново.make lintиnpx jestзелёные, 13 тестов.🤖 Generated with Claude Code