@@ -168,7 +168,7 @@ namespace {
168
168
for (auto & arg: flag.GetArgs ()) {
169
169
args.push_back (arg);
170
170
}
171
- if (!ApplyFlag (pos, flag.GetName (), args, ctx)) {
171
+ if (!ApplyFlag (pos, flag.GetName (), args, ctx, 0 )) {
172
172
return false ;
173
173
}
174
174
}
@@ -276,7 +276,7 @@ namespace {
276
276
return res;
277
277
}
278
278
279
- if (!ApplyFlag (ctx.GetPosition (node->Child (2 )->Pos ()), command, args, ctx)) {
279
+ if (!ApplyFlag (ctx.GetPosition (node->Child (2 )->Pos ()), command, args, ctx, node-> UniqueId () )) {
280
280
return {};
281
281
}
282
282
@@ -479,7 +479,7 @@ namespace {
479
479
return true ;
480
480
}
481
481
482
- if (!PendingEvaluationFiles.insert (TString (node.Child (3 )->Content ())).second ) {
482
+ if (!PendingEvaluationFiles.insert ({ TString (node.Child (3 )->Content ()), node. UniqueId ()} ).second ) {
483
483
ctx.AddError (TIssue (ctx.GetPosition (node.Pos ()), TStringBuilder () << " Detected evaluation cycle for file: " << node.Child (3 )->Content ()));
484
484
return false ;
485
485
}
@@ -490,7 +490,8 @@ namespace {
490
490
}
491
491
}
492
492
493
- bool ApplyFlag (const TPosition& pos, const TStringBuf name, const TVector<TStringBuf>& args, TExprContext& ctx) {
493
+ bool ApplyFlag (const TPosition& pos, const TStringBuf name, const TVector<TStringBuf>& args, TExprContext& ctx,
494
+ ui64 nodeUniqueId) {
494
495
if (!IsSettingAllowed (pos, name, ctx)) {
495
496
return false ;
496
497
}
@@ -504,15 +505,15 @@ namespace {
504
505
return false ;
505
506
}
506
507
} else if (name == " AddFileByUrl" ) {
507
- if (!AddFileByUrl (pos, args, ctx)) {
508
+ if (!AddFileByUrl (pos, args, ctx, nodeUniqueId )) {
508
509
return false ;
509
510
}
510
511
} else if (name == " SetFileOption" ) {
511
512
if (!SetFileOption (pos, args, ctx)) {
512
513
return false ;
513
514
}
514
515
} else if (name == " AddFolderByUrl" ) {
515
- if (!AddFolderByUrl (pos, args, ctx)) {
516
+ if (!AddFolderByUrl (pos, args, ctx, nodeUniqueId )) {
516
517
return false ;
517
518
}
518
519
} else if (name == " SetPackageVersion" ) {
@@ -1015,13 +1016,13 @@ namespace {
1015
1016
return true ;
1016
1017
}
1017
1018
1018
- bool AddFileByUrl (const TPosition& pos, const TVector<TStringBuf>& args, TExprContext& ctx) {
1019
+ bool AddFileByUrl (const TPosition& pos, const TVector<TStringBuf>& args, TExprContext& ctx, ui64 nodeUniqueId ) {
1019
1020
if (args.size () < 2 || args.size () > 3 ) {
1020
1021
ctx.AddError (TIssue (pos, TStringBuilder () << " Expected 2 or 3 arguments, but got " << args.size ()));
1021
1022
return false ;
1022
1023
}
1023
1024
1024
- PendingEvaluationFiles.erase (TString (args[0 ]));
1025
+ PendingEvaluationFiles.erase ({ TString (args[0 ]),nodeUniqueId} );
1025
1026
TStringBuf token = args.size () == 3 ? args[2 ] : TStringBuf ();
1026
1027
if (token) {
1027
1028
if (auto cred = Types.Credentials ->FindCredential (token)) {
@@ -1135,13 +1136,13 @@ namespace {
1135
1136
return url;
1136
1137
}
1137
1138
1138
- bool AddFolderByUrl (const TPosition& pos, const TVector<TStringBuf>& args, TExprContext& ctx) {
1139
+ bool AddFolderByUrl (const TPosition& pos, const TVector<TStringBuf>& args, TExprContext& ctx, ui64 nodeUniqueId ) {
1139
1140
if (args.size () < 2 || args.size () > 3 ) {
1140
1141
ctx.AddError (TIssue (pos, TStringBuilder () << " Expected 2 or 3 arguments, but got " << args.size ()));
1141
1142
return false ;
1142
1143
}
1143
1144
1144
- PendingEvaluationFiles.erase (TString (args[0 ]));
1145
+ PendingEvaluationFiles.erase ({ TString (args[0 ]),nodeUniqueId} );
1145
1146
TStringBuf token = args.size () == 3 ? args[2 ] : TStringBuf ();
1146
1147
if (token) {
1147
1148
if (auto cred = Types.Credentials ->FindCredential (token)) {
@@ -1238,7 +1239,7 @@ namespace {
1238
1239
TString Username;
1239
1240
const TAllowSettingPolicy Policy;
1240
1241
TOperationStatistics Statistics;
1241
- THashSet<TString> PendingEvaluationFiles;
1242
+ THashSet<std::pair< TString, ui64> > PendingEvaluationFiles;
1242
1243
};
1243
1244
}
1244
1245
0 commit comments