Skip to content

Commit 489ddd9

Browse files
authored
Support FASTBuild v1.11 (#76)
Increase FASTBuild support from v1.08 to v1.11 ([FASTBuild Changelog](https://www.fastbuild.org/docs/changelog.html)). Previously the plugin worked for v1.11, but didn't support every features added after v1.08. Specifically support for the `_FASTBUILD_EXE_PATH_` builtin variable (added in FASTBuild v1.09).
1 parent 9a1f25f commit 489ddd9

File tree

5 files changed

+19
-4
lines changed

5 files changed

+19
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# v0.14.2
2+
3+
## New Features
4+
5+
* Increase FASTBuild support from v1.08 to v1.11 ([FASTBuild Changelog](https://www.fastbuild.org/docs/changelog.html)). Previously the plugin worked for v1.11, but didn't support every features added after v1.08. Specifically support for the `_FASTBUILD_EXE_PATH_` builtin variable (added in FASTBuild v1.09).
6+
17
# v0.14.1
28

39
## Bug Fixes

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Example:
5757

5858
## Compatibility
5959

60-
Compatible with [FASTBuild](https://www.fastbuild.org/) version 1.08 ([FASTBuild Changelog](https://www.fastbuild.org/docs/changelog.html)).
60+
Compatible with [FASTBuild](https://www.fastbuild.org/) version 1.11 ([FASTBuild Changelog](https://www.fastbuild.org/docs/changelog.html)).
6161

6262
It may be compatible with a newer version of FASTBuild, but this was the latest version tested.
6363

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "fastbuild-support",
33
"displayName": "FASTBuild Support",
44
"description": "FASTBuild language support. Includes go-to definition, find references, variable evaluation, syntax errors, etc.",
5-
"version": "0.14.1",
5+
"version": "0.14.2",
66
"preview": true,
77
"publisher": "HarrisonT",
88
"author": {

server/src/evaluator.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,7 @@ function createDefaultScopeStack(rootFbuildDirUri: vscodeUri.URI): ScopeStack {
877877
scopeStack.setVariableInCurrentScope('_CURRENT_BFF_DIR_', '', [createNoLocationVariableDefinition('_CURRENT_BFF_DIR_')]);
878878
scopeStack.setVariableInCurrentScope('_FASTBUILD_VERSION_STRING_', 'vPlaceholderFastBuildVersionString', [createNoLocationVariableDefinition('_FASTBUILD_VERSION_STRING_')]);
879879
scopeStack.setVariableInCurrentScope('_FASTBUILD_VERSION_', -1, [createNoLocationVariableDefinition('_FASTBUILD_VERSION_')]);
880+
scopeStack.setVariableInCurrentScope('_FASTBUILD_EXE_PATH_', 'placeholder-path-to-fastbuild-exe', [createNoLocationVariableDefinition('_FASTBUILD_EXE_PATH_')]);
880881

881882
return scopeStack;
882883
}

server/src/test/2-evaluator.test.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -911,21 +911,29 @@ describe('evaluator', () => {
911911
]);
912912
});
913913

914-
// We need to use a placeholder because we don't know the actual version of FASTBuild being run.
914+
// We need to use a placeholder because we don't know the actual version of FASTBuild executable.
915915
it('_FASTBUILD_VERSION_STRING_ is a builtin variable that evaluates to (a placeholder for) the current FASTBuild version as a string', () => {
916916
const input = `
917917
Print( ._FASTBUILD_VERSION_STRING_ )
918918
`;
919919
assertEvaluatedVariablesValueEqual(input, ['vPlaceholderFastBuildVersionString']);
920920
});
921921

922-
// We need to use a placeholder because we don't know the actual version of FASTBuild being run.
922+
// We need to use a placeholder because we don't know the actual version of FASTBuild executable.
923923
it('_FASTBUILD_VERSION_ is a builtin variable that evaluates to (a placeholder for) the current FASTBuild version as an integer', () => {
924924
const input = `
925925
Print( ._FASTBUILD_VERSION_ )
926926
`;
927927
assertEvaluatedVariablesValueEqual(input, [-1]);
928928
});
929+
930+
// We need to use a placeholder because we don't know the actual path to the FASTBuild executable.
931+
it('_FASTBUILD_EXE_PATH_ is a builtin variable that evaluates to (a placeholder for) the path to the FASTBuild executable', () => {
932+
const input = `
933+
Print( ._FASTBUILD_EXE_PATH_ )
934+
`;
935+
assertEvaluatedVariablesValueEqual(input, ['placeholder-path-to-fastbuild-exe']);
936+
});
929937
});
930938

931939
describe('addition', () => {

0 commit comments

Comments
 (0)