Skip to content

Commit 311d785

Browse files
authored
Merge pull request #1693 from EvilBeaver/publish/2.1.0
publish/2.1.0
2 parents 05c4815 + 1d6975b commit 311d785

76 files changed

Lines changed: 3295 additions & 1114 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cursor/rules/langversion.mdc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
alwaysApply: true
33
---
44

5-
Проект использует .net 8.0 и LangVersion 8, поэтому при генерации кода не используй языковые фичи C#, которые отсутствуют в C# 8.
5+
Проект VSCode.DebugAdapter использует net framework 4.8, поэтому при генерации кода для него не используй языковые фичи C#, которые отсутствуют в C# 7.3.
6+
Остальные проекты используют .net 8, можно применять C# 12.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
name: release-notes
3+
description: This skill creates release notes for new release by reading git commit log. Use it only when explicitly specified
4+
---
5+
6+
# Release notes
7+
8+
Когда нужно выпустить новый релиз, в репозитории нужно изменить файл install/release-notes.md (путь относительно корня репозитория)
9+
10+
Для того, чтобы собрать данные, нужно использовать git log и вызвать команду
11+
12+
```bat
13+
set LC_ALL=C.UTF-8
14+
set TAGNAME=%1
15+
16+
git --no-pager log --pretty="* %%s" --no-merges %TAGNAME%..HEAD
17+
```
18+
19+
где переменная TAGNAME должна быть git-тэгом предыдущего релиза. Результатом выполнения команды будут тексты коммитов, между TAGNAME и текущим состоянием ветки.
20+
21+
Ты должен запросить у пользователя тег предыдущей версии, либо пользователь тебе сообщит его в промпте сразу.
22+
23+
Далее, ты должен прочитать тексты коммитов, в них могут встречаться ссылки на github issues в виде указания номера задачи через решетку, например вот так:
24+
25+
`fixes #1234 bla-bla-bla`
26+
27+
Текст коммита также может не содержать упоминания задачи, или быть вовсе техническим/промежуточным коммитом, который в release notes попадать не должен, т.к. не описывает конечное изменение.
28+
29+
Твоя задача и цель - взять тексты коммитов и вывести из них изменения в версии, которые будут включены в файл install/release-notes.md.
30+
31+
Те коммиты, которые содержат ссылки на github - пойти на github в соответствующую задачу в репозитории https://github.com/EvilBeaver/OneScript/issues/<НомерЗадачи> и прочитать ее суть.
32+
33+
Те коммиты, которые ссылок на гитхаб не содержат, ты должен просто прочитать и решить - стоит их включать в release-notes или нет, содержат ли они описание конкретной сделанной функциональности, или это промежуточный, технический и не требующий публикации коммит.
34+
35+
Далее, ты должен сделать итоговый дайджест того, что было сделано в версии и записать это в файл install/release-notes.md. Каждая задача это отдельный bullet-point, причем ссылки на github должны быть сделаны в markdown реальными кликабельными ссылками.
36+
37+
## Формат файла release-notes
38+
39+
В начале записывается заголовок "Версия <НомерВерсии>. Какая сейчас конкретно версия ты должен посмотреть в файле Jenkinsfile в параметре VersionPrefix и взять его.
40+
41+
Далее идет перечень сделанных задач, как описано выше.
42+
Задачи разбиваются на две группы: исправление ошибок и новые возможности. Соответственно в release notes добавляются два раздела уровня "заголовок 2" для "Новые возможности" и "Исправление ошибок". Если задач по какой-то категории нет (например, были только исправления, а новых фич не было), то соответствующий раздел не добавляется в файл совсем.
43+
44+
## Instructions
45+
46+
1. Определи текущую выпускаемую версию, прочитав файл Jenkinsfile и его параметр VersionPrefix в самом начале
47+
2. Определи тег предыдущей версии. Для этого запроси его у пользователя, если тег не был сразу задан в промпте
48+
3. Выполни команду gitlog, как показано выше, для получения истории коммитов между версиями
49+
4. Составь дайджест изменений и запиши их в install/release-notes.md

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pipeline {
44
agent none
55

66
environment {
7-
VersionPrefix = '2.0.2'
7+
VersionPrefix = '2.1.0'
88
outputEnc = '65001'
99
}
1010

README-EN.md

Lines changed: 84 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,31 @@ The OneScript distribution already includes a set of the most commonly used pack
3434

3535
### Linux ###
3636

37+
#### v2.x (current branch) — .NET 8.0 based ####
38+
39+
Two ZIP archive variants are available:
40+
41+
| Variant | Description | External dependencies |
42+
|-------------------------------|--------------------------------------------|------------------------------------------------------------------------------------|
43+
| **SCD** (self-contained) | .NET Runtime is bundled inside the archive | None |
44+
| **FDD** (framework-dependent) | Smaller archive | Requires [.NET Runtime 8.0](https://learn.microsoft.com/dotnet/core/install/linux) |
45+
46+
Installation steps:
3747
- Download the ZIP archive for Linux from the [Releases](https://github.com/EvilBeaver/OneScript/releases) section or from the [official website](https://oscript.io).
3848
- Extract the archive to a convenient directory.
3949
- Set executable permissions:
4050
```bash
41-
chmod +x oscript
51+
chmod +x ./oscript
4252
```
4353

54+
The FDD variant requires .NET Runtime 8.0 — see installation instructions for your distribution at [learn.microsoft.com/dotnet/core/install/linux](https://learn.microsoft.com/dotnet/core/install/linux).
55+
56+
#### v1.x LTS — deb package (Mono) ####
57+
58+
The LTS branch is distributed as a `.deb` package and runs on Mono. The package automatically installs the minimum required Mono components; however, **the debugger requires `mono-complete`**.
59+
60+
> **Important for debugging on Ubuntu/Debian:** if breakpoints are not being hit, install `mono-complete` from the **official Mono Project repository** (not from the distribution's default repositories). For instructions specific to your system, see the [Mono Project website](https://www.mono-project.com/download/stable/#download-lin).
61+
4462
### MacOS ###
4563

4664
- Download the ZIP archive for macOS (x64 or arm64) from the [Releases](https://github.com/EvilBeaver/OneScript/releases) section or from the [official website](https://oscript.io).
@@ -57,50 +75,97 @@ The OneScript distribution already includes a set of the most commonly used pack
5775

5876
## Preparation
5977

60-
Links to distributions are provided below, however, please note that links may change over time and their relevance is not guaranteed. You need dotnet SDK and C++ compiler, which can be downloaded from anywhere you can find.
78+
To build the project you need:
79+
80+
* [.NET SDK 8.0](https://dotnet.microsoft.com/download/dotnet/8.0) (the project's target framework is `net8.0`).
81+
* A C++ compiler — only required to build the native bridge `ScriptEngine.NativeApi` (support for native add-ins compatible with the 1C NativeApi). On Windows the easiest way to get one is to install [MS Build Tools](https://visualstudio.microsoft.com/visual-studio-build-tools/) or Visual Studio with the "Desktop development with C++" workload. If a C++ compiler is not available, see the `NoCppCompiler` parameter below.
6182

62-
* Install [MS BuildTools](https://visualstudio.microsoft.com/ru/thank-you-downloading-visual-studio/?sku=buildtools&rel=16), when installing enable targeting for .net6, .net4.8, install C++ compiler.
83+
> Distribution links may change over time, their relevance is not guaranteed.
6384
6485
## Build
6586

66-
Launch Developer Command Prompt (will appear in the Start menu after installing MSBuildTools or Visual Studio). Navigate to the OneScript repository directory. The following are commands in the Developer Command Prompt console.
67-
Build is performed using msbuild. Targets:
87+
The build is driven by MSBuild via the `Build.csproj` script in the repository root. Commands can be run with `msbuild` (Developer Command Prompt installed together with MS Build Tools/Visual Studio) or with `dotnet msbuild` (cross-platform).
6888

69-
* CleanAll - clean previous build results
70-
* BuildAll - prepare files for distribution
71-
* MakeCPP;MakeFDD;MakeSCD;BuildDebugger - separate build targets for preparing different types of distributions
72-
* PrepareDistributionFiles - build full distribution packages (including libraries)
73-
* PackDistributions - prepare ZIP archives for distribution
74-
* CreateNuget - create packages for publishing to NuGet
89+
Main targets:
90+
91+
* `CleanAll` — clean previous build results;
92+
* `BuildAll` — build binary files for distribution (FDD, SCD, debugger; native components are also built when a C++ compiler is available);
93+
* `MakeCPP`, `MakeFDD`, `MakeSCD`, `BuildDebugger` — individual targets that build specific parts of the distribution;
94+
* `GatherLibrary` — download and stage the base set of libraries (`opm`, `asserts`, `logos`, `fs`, `tempfiles`, `cli`);
95+
* `PrepareDistributionFiles` — build full distribution contents (including libraries and documentation);
96+
* `PackDistributions` — pack the distribution contents into ZIP archives for all supported platforms;
97+
* `BuildDocumentation` — generate the platform reference (markdown + json);
98+
* `CreateNuget` / `PublishNuget` — build and publish NuGet packages;
99+
* `Test` (`UnitTests`, `ScriptedTests`) — run unit and acceptance (BSL) tests.
75100

76101
**Build parameters**
77102

78-
* VersionPrefix - release number prefix, its main part, for example, 2.0.0
79-
* VersionSuffix - version suffix, which usually acts as an arbitrary versioning suffix according to semver, for example, beta-786 (optional)
80-
* NoCppCompiler - if True - C++ compiler is not installed, C++ components (NativeApi support) will not be added to the build
103+
* `VersionPrefix` — main part of the release number, for example `2.0.0` (defaults to `2.0.0`);
104+
* `VersionSuffix` — optional SemVer suffix, for example `beta-786`;
105+
* `NoCppCompiler` — when set to `True`, native C++ components (NativeApi) are not built and not included in the distribution (use it when no C++ compiler is installed);
106+
* `Configuration` — build configuration, defaults to `Release`. For a debug build on Linux use `LinuxDebug`.
81107

82-
All distribution files will be placed in the `built` directory at the root of the 1Script repository
108+
All build artifacts are placed in the `built` directory at the repository root.
83109

84110
### Building distribution contents in a separate directory
85111

86112
```bat
87-
msbuild Build.csproj /t:CleanAll;PrepareDistributionFiles
113+
dotnet msbuild Build.csproj /t:CleanAll;PrepareDistributionFiles
88114
```
89115

90116
### Building with manual version specification
91117

92118
```bat
93-
msbuild Build.csproj /t:CleanAll;PrepareDistributionFiles /p:VersionPrefix=2.0.0
119+
dotnet msbuild Build.csproj /t:CleanAll;PrepareDistributionFiles /p:VersionPrefix=2.0.0
94120
```
95121

96122
### Building ZIP distributions
97123

98124
```bat
99-
msbuild Build.csproj /t:CleanAll;PrepareDistributionFiles;PackDistributions /p:VersionPrefix=2.0.0 /p:VersionSuffix=preview223
125+
dotnet msbuild Build.csproj /t:CleanAll;PrepareDistributionFiles;PackDistributions /p:VersionPrefix=2.0.0 /p:VersionSuffix=preview223
126+
```
127+
128+
### Building without C++ components (no NativeApi)
129+
130+
```bat
131+
dotnet msbuild Build.csproj /t:CleanAll;PrepareDistributionFiles /p:NoCppCompiler=True
100132
```
101133

102134
### Documentation generation
103135

104136
```bat
105-
msbuild Build.csproj /t:BuildDocumentation
137+
dotnet msbuild Build.csproj /t:BuildDocumentation
106138
```
139+
140+
# Testing
141+
142+
The project has two layers of tests:
143+
144+
* **C# unit tests** — located in `src/Tests/*` (xUnit/NUnit). Run them via `dotnet test` in the corresponding test project directory or all at once:
145+
```bat
146+
dotnet msbuild Build.csproj /t:UnitTests
147+
```
148+
* **BSL acceptance tests** — located in the `tests/` directory and executed by `testrunner.os` against a freshly built `oscript`. The repository includes wrapper scripts:
149+
```bat
150+
rem Windows
151+
tests\run-bsl-tests.cmd src\oscript\bin\Debug\net8.0\oscript.exe
152+
```
153+
154+
```bash
155+
# Linux/macOS
156+
tests/run-bsl-tests.sh src/oscript/bin/Debug/net8.0/oscript
157+
```
158+
159+
Before running the acceptance tests, build `oscript`:
160+
```bat
161+
dotnet build src/oscript/oscript.csproj
162+
```
163+
164+
# Developer documentation
165+
166+
If you want to contribute to the project, take a look at the additional documents in the [`docs/`](docs/) directory:
167+
168+
* [`docs/developer_docs.md`](docs/developer_docs.md) — project architecture, solution layout and guided tour of the source code.
169+
* [`docs/contexts.md`](docs/contexts.md) — a practical guide to adding BSL contexts, methods, properties and global functions.
170+
* [`CODESTYLE.md`](CODESTYLE.md) — C# code style requirements.
171+

0 commit comments

Comments
 (0)