Skip to content

Commit

Permalink
Merge pull request #124 from jlchmura/issue-122
Browse files Browse the repository at this point in the history
do not add global include to lib files, closes #122
  • Loading branch information
jlchmura authored Dec 20, 2024
2 parents bb7add9 + b38f9d1 commit 9622bf8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## 1.1.14

- Fix: [.h file incorrectly marks code as disabled #122](https://github.com/jlchmura/lpc-language-server/issues/122)
- Set default max heap size to 3072 and added the `LPC.languageServer.maxLpcServerMemory` configuration option to change.
- Detect and report circular `#include` references.

Expand Down
2 changes: 1 addition & 1 deletion server/src/compiler/program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg
if (rootNames.length && !skipDefaultLib) {
const defaultLibraryFileName = getDefaultLibraryFileName();
if (!options.lib && defaultLibraryFileName) {
const libSourceFile = getSourceFileWithoutReferences(defaultLibraryFileName, /*isDefaultLib*/ false, { kind: FileIncludeKind.LibFile });
const libSourceFile = getSourceFileWithoutReferences(defaultLibraryFileName, /*isDefaultLib*/ true, { kind: FileIncludeKind.LibFile });
if (libSourceFile && libSourceFile.parsedMacros) {
options.configDefines = options.configDefines || {};
// add macros from the default lib to the config table
Expand Down

0 comments on commit 9622bf8

Please sign in to comment.