Skip to content

Commit ad67357

Browse files
authored
Выпуск 2.0.0-rc.8 (#1560)
1 parent b0c6e04 commit ad67357

File tree

85 files changed

+2458
-814
lines changed

Some content is hidden

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

85 files changed

+2458
-814
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
*.sh text eol=lf
22
install/opm text eol=lf
33
install/oscript text eol=lf
4-
*.zip filter=lfs diff=lfs merge=lfs -text
4+
#*.zip filter=lfs diff=lfs merge=lfs -text

.github/copilot-instructions.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Команда запуска полной сборки и прогона тестов на Linux:
2+
3+
```sh
4+
dotnet msbuild Build.csproj /t:"CleanAll;MakeFDD;GatherLibrary;ComposeDistributionFolders;Test" /p:Configuration=LinuxDebug /p:NoCppCompiler=True
5+
```
6+
7+
Запуск приемочных тестов:
8+
9+
```sh
10+
dotnet oscript.dll tests/testrunner.os -runAll tests
11+
```
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: "OneScript Development Environment Setup"
2+
3+
# Allow testing of the setup steps from your repository's "Actions" tab.
4+
on: workflow_dispatch
5+
6+
jobs:
7+
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
8+
copilot-setup-steps:
9+
runs-on: ubuntu-latest
10+
11+
# Set the permissions to the lowest permissions possible needed for your steps.
12+
# Copilot will be given its own token for its operations.
13+
permissions:
14+
# Clone the repository to install dependencies
15+
contents: read
16+
17+
# Setup steps for OneScript development environment
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- run: git config --global core.quotepath false
23+
24+
- uses: actions/setup-dotnet@v4
25+
with:
26+
dotnet-version: '6.0.x'
27+
28+
- name: Установка OneScript
29+
uses: otymko/[email protected]
30+
with:
31+
version: stable
32+
33+
- name: Установка зависимостей
34+
run: |
35+
opm install opm
36+
opm update --all
37+

Build.csproj

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -363,22 +363,14 @@
363363

364364
</Target>
365365

366-
<Target Name="PublishNuget" DependsOnTargets="CreateNuget">
366+
<Target Name="PublishNuget">
367367
<ItemGroup>
368-
<NugetAbleProject Include="ScriptEngine"/>
369-
<NugetAbleProject Include="ScriptEngine.HostedScript"/>
370-
<NugetAbleProject Include="OneScript.StandardLibrary"/>
371-
<NugetAbleProject Include="OneScript.Web.Server"/>
372-
<NugetAbleProject Include="OneScript.Core"/>
373-
<NugetAbleProject Include="OneScript.Native"/>
374-
<NugetAbleProject Include="OneScript.Language"/>
375-
<NugetAbleProject Include="OneScript.DebugServices"/>
376-
<NugetAbleProject Include="OneScript.DebugProtocol"/>
368+
<NugetAbleProject Include="$(MSBuildProjectDirectory)\built\nuget\*.nupkg"/>
377369
</ItemGroup>
378370

379371
<Error Text="No nuget token (/p:NugetToken=) specified" Condition="'$(NugetToken)' == ''" />
380372
<Exec WorkingDirectory="$(MSBuildProjectDirectory)\built\nuget"
381-
Command="dotnet nuget push %(NugetAbleProject.Identity).$(ReleaseNumber).nupkg -k $(NugetToken) -s https://api.nuget.org/v3/index.json" UseUtf8Encoding="Always"/>
373+
Command="dotnet nuget push %(NugetAbleProject.Identity) -k $(NugetToken) -s https://api.nuget.org/v3/index.json" UseUtf8Encoding="Always"/>
382374

383375
</Target>
384376

Jenkinsfile

Lines changed: 54 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pipeline {
55

66
environment {
77
VersionPrefix = '2.0.0'
8-
VersionSuffix = 'rc.7'
8+
VersionSuffix = 'rc.8'
99
outputEnc = '65001'
1010
}
1111

@@ -190,16 +190,8 @@ pipeline {
190190
xcopy output\\na-proxy\\*64.so built\\linux-x64\\bin\\ /F
191191
'''.stripIndent()
192192

193-
script
194-
{
195-
if (env.BRANCH_NAME == "preview") {
196-
echo 'Building preview'
197-
bat "chcp $outputEnc > nul\r\n\"${tool 'MSBuild'}\" Build.csproj /t:PackDistributions /p:Suffix=-pre%BUILD_NUMBER%"
198-
}
199-
else{
200-
bat "chcp $outputEnc > nul\r\n\"${tool 'MSBuild'}\" Build.csproj /t:PackDistributions"
201-
}
202-
}
193+
bat "chcp $outputEnc > nul\r\n\"${tool 'MSBuild'}\" Build.csproj /t:PackDistributions"
194+
203195
archiveArtifacts artifacts: 'built/**', fingerprint: true
204196
stash includes: 'built/**', name: 'dist'
205197
}
@@ -220,17 +212,7 @@ pipeline {
220212
unstash 'dist'
221213
unstash 'vsix'
222214

223-
dir('targetContent') {
224-
sh '''
225-
ZIPS=../built
226-
VSIX=../built/vscode
227-
mv $ZIPS/*.zip ./
228-
mv $VSIX/*.vsix ./
229-
230-
TARGET="/var/www/oscript.io/download/versions/night-build/"
231-
sudo rsync -rv --delete --exclude mddoc*.zip --exclude *.src.rpm . $TARGET
232-
'''.stripIndent()
233-
}
215+
publishRelease('night-build', false)
234216
}
235217
}
236218

@@ -242,64 +224,17 @@ pipeline {
242224
agent { label 'master' }
243225
options { skipDefaultCheckout() }
244226

245-
environment {
246-
CODENAME = 'preview'
247-
}
248-
249227
steps {
250-
checkout scm
228+
cleanWs()
229+
checkout scm // чтобы получить файл release-notes
251230
unstash 'dist'
252231
unstash 'vsix'
253-
254-
dir('targetContent') {
255-
sh '''
256-
ZIPS=../built
257-
NUGET=../built/nuget
258-
VSIX=../built/vscode
259-
mv $ZIPS/*.zip ./
260-
mv $VSIX/*.vsix ./
261-
262-
TARGET="/var/www/oscript.io/download/versions/${CODENAME}/"
263-
sudo rsync -rv --delete --exclude mddoc*.zip --exclude *.src.rpm . $TARGET
264-
'''.stripIndent()
265-
}
266232

267-
sh '''
268-
TARGET_DIR="/var/www/oscript.io/markdown/versions/"
269-
cp install/release-notes.md "${TARGET_DIR}/${CODENAME}.md"
270-
cp install/release-notes.md "${TARGET_DIR}/${VersionPrefix}.md"
271-
'''.stripIndent()
272-
}
273-
}
274-
275-
stage ('Publishing latest') {
276-
when { anyOf {
277-
branch 'release/latest';
278-
}
279-
}
280-
agent { label 'master' }
281-
options { skipDefaultCheckout() }
282-
283-
environment {
284-
CODENAME = 'preview'
285-
}
286-
287-
steps {
288-
checkout scm
289-
unstash 'dist'
290-
unstash 'vsix'
233+
// Положит описание для сайта
234+
publishReleaseNotes('preview')
291235

292-
dir('targetContent') {
293-
sh '''
294-
ZIPS=../built
295-
VSIX=../built/vscode
296-
mv $ZIPS/*.zip ./
297-
mv $VSIX/*.vsix ./
298-
299-
TARGET="/var/www/oscript.io/download/versions/latest/"
300-
sudo rsync -rv --delete --exclude mddoc*.zip --exclude *.src.rpm . $TARGET
301-
'''.stripIndent()
302-
}
236+
// Положит файлы дистрибутива в целевую папку
237+
publishRelease('preview', true)
303238
}
304239
}
305240

@@ -314,11 +249,54 @@ pipeline {
314249
agent { label 'windows' }
315250

316251
steps{
317-
unstash 'dist'
252+
253+
unstash 'buildResults'
254+
318255
withCredentials([string(credentialsId: 'NuGetToken', variable: 'NUGET_TOKEN')]) {
319256
bat "chcp $outputEnc > nul\r\n\"${tool 'MSBuild'}\" Build.csproj /t:PublishNuget /p:NugetToken=$NUGET_TOKEN"
320257
}
321258
}
322259
}
323260
}
324261
}
262+
263+
def publishRelease(codename, isNumbered) {
264+
dir('targetContent') {
265+
sh """
266+
ZIPS=../built
267+
NUGET=../built/nuget
268+
VSIX=../built/vscode
269+
mv \$ZIPS/*.zip ./
270+
mv \$VSIX/*.vsix ./
271+
272+
TARGET="/var/www/oscript.io/download/versions/${codename}/"
273+
mkdir -p \$TARGET
274+
sudo rsync -rv --delete --exclude mddoc*.zip --exclude *.src.rpm . \$TARGET
275+
""".stripIndent()
276+
277+
if (isNumbered) {
278+
def version="${env.VersionPrefix}-${env.VersionSuffix}".replaceAll("\\.", "_")
279+
280+
sh """
281+
TARGET="/var/www/oscript.io/download/versions/${version}/"
282+
mkdir -p \$TARGET
283+
sudo rsync -rv --delete --exclude mddoc*.zip --exclude *.src.rpm . \$TARGET
284+
""".stripIndent()
285+
}
286+
}
287+
}
288+
289+
def publishReleaseNotes(codename) {
290+
dir('markdownContent') {
291+
def version="${env.VersionPrefix}-${env.VersionSuffix}".replaceAll("\\.", "_")
292+
def targetDir='/var/www/oscript.io/markdown/versions'
293+
294+
sh """
295+
cp ../install/release-notes.md "./${codename}.md"
296+
cp ../install/release-notes.md "./${version}.md"
297+
298+
sudo rsync -rv . ${targetDir}
299+
""".stripIndent()
300+
}
301+
}
302+

install/release-notes.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
# Новое в версии 2.0.0-rc.7
1+
# Новое в версии 2.0.0-rc.8
22

3-
* Проведена масштабная доработка ядра в части управления потоками bsl и удаления глобальных статических классов.
4-
* Нумерация версий ошибочно не соответствовала semver в части пре-релизного номера. Нумерация приведена к semver
5-
* Полностью переписан генератор документации OneScriptDocumenter
6-
* ВебСервер учитывает настройку FormOptions в appsettings.json
7-
* Проведена оптимизация экранирования символов в ЗаписьJSON
3+
* Заменена библиотека DotNetZip на форк ProDotNetZip из-за незакрытой уязвимости CVE-2024-48510
4+
* Существенно ускорена компиляция большого числа модулей. Запуск тяжелых приложений с множеством классов стал намного быстрее.
5+
* Доработан отладчик и сервер отладки, введен новый протокол обмена данными для отказа от BinaryFormatter в рамках перехода на net8
6+
* Изменен формат конфигурации для включения лога отладки. См. каталог установки расширения и файл `VSCode.DebugAdapter.exe.config`
7+
* Изменен вывод компилятора в случае ошибки. Изменена отметка отметка позиции ошибки в строке. Более точное позиционирование ошибки
88

99
# Исправление ошибок
1010

11-
* Отладчик неверно шагает, не встает на строку КонецПроцедуры/Функции при обработке возврата
12-
* Возвращено поведение загрузчика из версии 1 с приоритетом ключа lib.additional
13-
* TestApp не добавлялся в состав дистрибутива SCD для Windows
14-
* Поведение Соответствия с ключом Неопределено приведено к новым версиям платформы.
15-
* Метод ЧтениеДанных.ПрочитатьБайт не выбрасывает исключение в конце потока
16-
* Исправление английского варианта метода `КаталогПрограммы`. Теперь используется совместимое с 1С название `BinDir`. Старый (неверный) вариант `ProgramDirectory` также поддерживаются с выдачей предупреждения
11+
* Разрешены комментарии после аннотаций модуля
12+
* Разрешено использование комментариев в строке с директивой Использовать
13+
* Слово Ждать вне асинхронного метода не должно иметь специального значения

src/1Script.sln

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OneScript.Web.Server", "One
6767
EndProject
6868
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DocumenterTests", "Tests\DocumenterTests\DocumenterTests.csproj", "{BD385142-E9B4-43C1-8F88-067F24E5AF6D}"
6969
EndProject
70+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VSCode.DebugAdapter.Tests", "Tests\VSCode.DebugAdapter.Tests\VSCode.DebugAdapter.Tests.csproj", "{861F70F4-B10D-4E4E-865C-B8E900391424}"
71+
EndProject
7072
Global
7173
GlobalSection(SolutionConfigurationPlatforms) = preSolution
7274
Debug|Any CPU = Debug|Any CPU
@@ -339,6 +341,18 @@ Global
339341
{BD385142-E9B4-43C1-8F88-067F24E5AF6D}.Release|Any CPU.Build.0 = Release|Any CPU
340342
{BD385142-E9B4-43C1-8F88-067F24E5AF6D}.Release|x86.ActiveCfg = Release|Any CPU
341343
{BD385142-E9B4-43C1-8F88-067F24E5AF6D}.Release|x86.Build.0 = Release|Any CPU
344+
{861F70F4-B10D-4E4E-865C-B8E900391424}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
345+
{861F70F4-B10D-4E4E-865C-B8E900391424}.Debug|Any CPU.Build.0 = Debug|Any CPU
346+
{861F70F4-B10D-4E4E-865C-B8E900391424}.Debug|x86.ActiveCfg = Debug|Any CPU
347+
{861F70F4-B10D-4E4E-865C-B8E900391424}.Debug|x86.Build.0 = Debug|Any CPU
348+
{861F70F4-B10D-4E4E-865C-B8E900391424}.LinuxDebug|Any CPU.ActiveCfg = Debug|Any CPU
349+
{861F70F4-B10D-4E4E-865C-B8E900391424}.LinuxDebug|Any CPU.Build.0 = Debug|Any CPU
350+
{861F70F4-B10D-4E4E-865C-B8E900391424}.LinuxDebug|x86.ActiveCfg = Debug|Any CPU
351+
{861F70F4-B10D-4E4E-865C-B8E900391424}.LinuxDebug|x86.Build.0 = Debug|Any CPU
352+
{861F70F4-B10D-4E4E-865C-B8E900391424}.Release|Any CPU.ActiveCfg = Release|Any CPU
353+
{861F70F4-B10D-4E4E-865C-B8E900391424}.Release|Any CPU.Build.0 = Release|Any CPU
354+
{861F70F4-B10D-4E4E-865C-B8E900391424}.Release|x86.ActiveCfg = Release|Any CPU
355+
{861F70F4-B10D-4E4E-865C-B8E900391424}.Release|x86.Build.0 = Release|Any CPU
342356
EndGlobalSection
343357
GlobalSection(SolutionProperties) = preSolution
344358
HideSolutionNode = FALSE
@@ -351,6 +365,7 @@ Global
351365
{0F5E6099-39BA-41CF-B55F-357F7DF4DE00} = {91059C5B-526C-4B81-B106-99DEFF542D1F}
352366
{2F264379-B3B4-44B3-9CBA-A4B0AF3D8785} = {91059C5B-526C-4B81-B106-99DEFF542D1F}
353367
{BD385142-E9B4-43C1-8F88-067F24E5AF6D} = {91059C5B-526C-4B81-B106-99DEFF542D1F}
368+
{861F70F4-B10D-4E4E-865C-B8E900391424} = {91059C5B-526C-4B81-B106-99DEFF542D1F}
354369
EndGlobalSection
355370
GlobalSection(ExtensibilityGlobals) = postSolution
356371
SolutionGuid = {A4A871EF-C5A7-478F-907E-31C69A869973}

src/OneScript.DebugProtocol/Abstractions/ICommunicationChannel.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,7 @@ public interface ICommunicationChannel : IDisposable
1717

1818
object Read();
1919

20+
bool Connected { get; }
21+
2022
}
2123
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*----------------------------------------------------------
2+
This Source Code Form is subject to the terms of the
3+
Mozilla Public License, v.2.0. If a copy of the MPL
4+
was not distributed with this file, You can obtain one
5+
at http://mozilla.org/MPL/2.0/.
6+
----------------------------------------------------------*/
7+
using System;
8+
9+
namespace OneScript.DebugProtocol
10+
{
11+
[Serializable]
12+
public class ExceptionBreakpointFilter
13+
{
14+
public string Id { get; set; }
15+
16+
public string Condition { get; set; }
17+
}
18+
}

src/OneScript.DebugProtocol/IDebuggerService.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ This Source Code Form is subject to the terms of the
55
at http://mozilla.org/MPL/2.0/.
66
----------------------------------------------------------*/
77

8+
using System;
9+
810
namespace OneScript.DebugProtocol
911
{
1012
/// <summary>
@@ -19,10 +21,17 @@ public interface IDebuggerService
1921
void Execute(int threadId);
2022

2123
/// <summary>
22-
/// Добавление фильтров точек останова для исплючений
24+
/// Добавление фильтров точек останова для исключений
2325
/// </summary>
2426
/// <param name="filters"></param>
27+
[Obsolete("Используется только для совместимости нового адаптера со старыми binary версиями движка")]
2528
void SetMachineExceptionBreakpoints((string Id, string Condition)[] filters);
29+
30+
/// <summary>
31+
/// Добавление фильтров точек останова для исключений
32+
/// </summary>
33+
/// <param name="filters"></param>
34+
void SetExceptionBreakpoints(ExceptionBreakpointFilter[] filters);
2635

2736
/// <summary>
2837
/// Установка точек остановки

0 commit comments

Comments
 (0)