oscript-library / oscript-library/opm

Декларативное определение библиотеки на основе структуры проекта

Open
#203 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
1C Enterprise
Stars
85
Forks
35
Avg merge
1m
Merged PRs (30d)
1

Description

Взято по аналогии со стандартами разработки Go (https://github.com/golang-standards/project-layout)

Реализовать декларативное описание библиотеки на основании структуры проекта. Например:

  • /cmd - определяет "ИсполняемыйФайл".
  • /pkg (/public) - Классы и модули расположенные определяют публичные объекты аналогично "ОпределяетКласс"/"ОпределяетМодуль"
  • /bin - регистрирует расположенные внутри аддины.
  • /internal (/private) - включает в состав пакета, но не публикует классы/модули
  • /vendor - включает в состав поставляемые библиотеки (текущий аналог oscript-modules)
  • /docs, /examples, /etc ... - дополнительные файлы библиотеки (документация, примеры, другое)
  • /tests - содержит тесты проекта. Тесты запускаются в едином с /public+/private контексте.

Для задания псевдонимов реализовать множественную аннотацию @Синоним/@Alias. Например:
/cmd/main.os - имя по умолчанию - создается cmd по имени библиотеки. Для

@Alias vrunner
@Alias runner

Или реализовать alias.json в папке с файлом:

{
   "main.os": [ "vrunner", "runner" ]
}

Аналогично, для публичных классов/модулей.

Это позволит:

  1. Упростить описание проекта, полностью убрав, или разместив декларации объектов максимально приближенно к их определению
  2. Сделает проекты более структурированными, что повысит их читаемость и сопровождаемость

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the current oscript-modules packaging behavior, then map how /cmd, /pkg or /public, /internal or /private, /bin, /vendor, /docs, /examples, /etc, and /tests should be interpreted. Compare the proposed @Alias annotation and alias.json approaches. Done means the project structure declaratively defines included and published objects, tests, extra files, and aliases without separate declarations.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.