Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
192e7a13
U
uni-app
项目概览
DCloud
/
uni-app
6 个月 前同步成功
通知
751
Star
38709
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
8
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
8
Issue
8
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
192e7a13
编写于
9月 08, 2023
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
wip(uts): compiler
上级
1c11b5bd
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
32 addition
and
21 deletion
+32
-21
packages/shims-node.d.ts
packages/shims-node.d.ts
+2
-0
packages/uni-uts-v1/__tests__/examples/uts/unpackage/cache/app-android/uts/utssdk/test-uts/manifest.json
...ckage/cache/app-android/uts/utssdk/test-uts/manifest.json
+2
-2
packages/uni-uts-v1/__tests__/examples/uts/unpackage/cache/app-ios/uts/utssdk/test-uts/manifest.json
...unpackage/cache/app-ios/uts/utssdk/test-uts/manifest.json
+2
-2
packages/uni-uts-v1/src/kotlin.ts
packages/uni-uts-v1/src/kotlin.ts
+1
-0
packages/uni-uts-v1/src/stacktrace/kotlin.ts
packages/uni-uts-v1/src/stacktrace/kotlin.ts
+17
-13
packages/uni-uts-v1/src/swift.ts
packages/uni-uts-v1/src/swift.ts
+1
-0
packages/uni-uts-v1/src/uvue/index.ts
packages/uni-uts-v1/src/uvue/index.ts
+6
-4
packages/uts-darwin-arm64/uts.darwin-arm64.node
packages/uts-darwin-arm64/uts.darwin-arm64.node
+0
-0
packages/uts-darwin-x64/uts.darwin-x64.node
packages/uts-darwin-x64/uts.darwin-x64.node
+0
-0
packages/uts-linux-x64-gnu/uts.linux-x64-gnu.node
packages/uts-linux-x64-gnu/uts.linux-x64-gnu.node
+0
-0
packages/uts-linux-x64-musl/uts.linux-x64-musl.node
packages/uts-linux-x64-musl/uts.linux-x64-musl.node
+0
-0
packages/uts/src/types.ts
packages/uts/src/types.ts
+1
-0
未找到文件。
packages/shims-node.d.ts
浏览文件 @
192e7a13
...
...
@@ -52,5 +52,7 @@ declare namespace NodeJS {
UNI_APP_X
?:
'
true
'
|
'
false
'
UNI_APP_X_CACHE_DIR
?:
string
HX_Version
:
string
}
}
packages/uni-uts-v1/__tests__/examples/uts/unpackage/cache/app-android/uts/utssdk/test-uts/manifest.json
浏览文件 @
192e7a13
...
...
@@ -11,10 +11,10 @@
"md5"
:
"d41d8cd98f00b204e9800998ecf8427e"
},
"index.uts"
:
{
"md5"
:
"
fb7530a446dae78d4853ff5bf698ed20
"
"md5"
:
"
719035aae84f58b2028f63d102c49887
"
},
"interface.uts"
:
{
"md5"
:
"
8a55e93e1d27e88f34d38b8a7c0a3608
"
"md5"
:
"
4821d45870be9af550787418f7a4c34c
"
},
"package.json"
:
{
"md5"
:
"9595031a0d4158abb72060cdf3a200c1"
...
...
packages/uni-uts-v1/__tests__/examples/uts/unpackage/cache/app-ios/uts/utssdk/test-uts/manifest.json
浏览文件 @
192e7a13
...
...
@@ -11,10 +11,10 @@
"md5"
:
"d41d8cd98f00b204e9800998ecf8427e"
},
"index.uts"
:
{
"md5"
:
"
fb7530a446dae78d4853ff5bf698ed20
"
"md5"
:
"
719035aae84f58b2028f63d102c49887
"
},
"interface.uts"
:
{
"md5"
:
"
8a55e93e1d27e88f34d38b8a7c0a3608
"
"md5"
:
"
4821d45870be9af550787418f7a4c34c
"
},
"package.json"
:
{
"md5"
:
"9595031a0d4158abb72060cdf3a200c1"
...
...
packages/uni-uts-v1/src/kotlin.ts
浏览文件 @
192e7a13
...
...
@@ -433,6 +433,7 @@ export async function compile(
}
const
options
:
UTSBundleOptions
=
{
mode
:
process
.
env
.
NODE_ENV
,
hbxVersion
:
process
.
env
.
HX_Version
||
process
.
env
.
UNI_COMPILER_VERSION
,
input
,
output
:
{
isX
,
...
...
packages/uni-uts-v1/src/stacktrace/kotlin.ts
浏览文件 @
192e7a13
...
...
@@ -139,24 +139,28 @@ let kotlinManifest = {
manifest
:
{}
as
Record
<
string
,
string
>
,
}
export
interface
KotlinManifestCache
{
version
:
string
env
:
Record
<
string
,
string
>
files
:
Record
<
string
,
Record
<
string
,
string
>>
}
function
updateUTSKotlinSourceMapManifestCache
(
cacheDir
:
string
)
{
const
manifestFile
=
path
.
resolve
(
cacheDir
,
'
src/.manifest.json
'
)
const
stats
=
fs
.
statSync
(
manifestFile
)
if
(
stats
.
isFile
())
{
if
(
kotlinManifest
.
mtimeMs
!==
stats
.
mtimeMs
)
{
const
manifest
=
fs
.
readJSONSync
(
manifestFile
)
as
Record
<
string
,
Record
<
string
,
string
>
>
const
classManifest
:
Record
<
string
,
string
>
=
{}
Object
.
keys
(
manifest
).
forEach
((
name
)
=>
{
const
kotlinClass
=
manifest
[
name
].
class
if
(
kotlinClass
)
{
classManifest
[
kotlinClass
]
=
name
}
})
kotlinManifest
.
mtimeMs
=
stats
.
mtimeMs
kotlinManifest
.
manifest
=
classManifest
const
{
files
}
=
fs
.
readJSONSync
(
manifestFile
)
as
KotlinManifestCache
if
(
files
)
{
const
classManifest
:
Record
<
string
,
string
>
=
{}
Object
.
keys
(
files
).
forEach
((
name
)
=>
{
const
kotlinClass
=
files
[
name
].
class
if
(
kotlinClass
)
{
classManifest
[
kotlinClass
]
=
name
}
})
kotlinManifest
.
mtimeMs
=
stats
.
mtimeMs
kotlinManifest
.
manifest
=
classManifest
}
}
}
}
...
...
packages/uni-uts-v1/src/swift.ts
浏览文件 @
192e7a13
...
...
@@ -235,6 +235,7 @@ export async function compile(
}
const
options
:
UTSBundleOptions
=
{
mode
:
process
.
env
.
NODE_ENV
,
hbxVersion
:
process
.
env
.
HX_Version
||
process
.
env
.
UNI_COMPILER_VERSION
,
input
,
output
:
{
isX
,
...
...
packages/uni-uts-v1/src/uvue/index.ts
浏览文件 @
192e7a13
...
...
@@ -24,6 +24,7 @@ import {
isUniCloudSupported
,
parseExtApiDefaultParameters
,
}
from
'
../utils
'
import
{
KotlinManifestCache
}
from
'
../stacktrace/kotlin
'
const
DEFAULT_IMPORTS
=
[
'
kotlinx.coroutines.async
'
,
...
...
@@ -95,6 +96,7 @@ export async function compileApp(entry: string, options: CompileAppOptions) {
const
bundleOptions
:
UTSBundleOptions
=
{
mode
:
process
.
env
.
NODE_ENV
,
hbxVersion
:
process
.
env
.
HX_Version
||
process
.
env
.
UNI_COMPILER_VERSION
,
input
,
output
:
{
isX
:
true
,
...
...
@@ -317,9 +319,9 @@ async function runKotlinDev(
// 编译失败,需要调整缓存的 manifest.json
if
(
result
.
changed
.
length
)
{
const
manifest
=
readKotlinManifestJson
(
kotlinSrcOutDir
)
if
(
manifest
)
{
if
(
manifest
&&
manifest
.
files
)
{
result
.
changed
.
forEach
((
file
)
=>
{
delete
manifest
[
file
]
delete
manifest
.
files
[
file
]
})
writeKotlinManifestJson
(
kotlinSrcOutDir
,
manifest
)
}
...
...
@@ -345,7 +347,7 @@ function hasKotlinManifestJson(kotlinSrcOutDir: string) {
function
readKotlinManifestJson
(
kotlinSrcOutDir
:
string
):
Record
<
string
,
string
>
|
undefined
{
):
KotlinManifestCache
|
undefined
{
const
file
=
path
.
resolve
(
kotlinSrcOutDir
,
'
.manifest.json
'
)
if
(
fs
.
existsSync
(
file
))
{
return
JSON
.
parse
(
fs
.
readFileSync
(
file
,
'
utf8
'
))
...
...
@@ -354,7 +356,7 @@ function readKotlinManifestJson(
function
writeKotlinManifestJson
(
kotlinSrcOutDir
:
string
,
manifest
:
Record
<
string
,
string
>
manifest
:
KotlinManifestCache
)
{
fs
.
writeFileSync
(
path
.
resolve
(
kotlinSrcOutDir
,
'
.manifest.json
'
),
...
...
packages/uts-darwin-arm64/uts.darwin-arm64.node
浏览文件 @
192e7a13
无法预览此类型文件
packages/uts-darwin-x64/uts.darwin-x64.node
浏览文件 @
192e7a13
无法预览此类型文件
packages/uts-linux-x64-gnu/uts.linux-x64-gnu.node
浏览文件 @
192e7a13
无法预览此类型文件
packages/uts-linux-x64-musl/uts.linux-x64-musl.node
浏览文件 @
192e7a13
无法预览此类型文件
packages/uts/src/types.ts
浏览文件 @
192e7a13
...
...
@@ -65,6 +65,7 @@ export type UTSOutputOptions = {
}
export
interface
UTSOptions
{
mode
?:
string
hbxVersion
:
string
input
:
UTSInputOptions
output
:
UTSOutputOptions
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录