Skip to content

Commit

Permalink
Resolve build/test errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
tjprescott committed Feb 5, 2025
1 parent f5a29ed commit 5b4812f
Show file tree
Hide file tree
Showing 10 changed files with 286 additions and 40 deletions.
2 changes: 0 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ grammars/
# auto generated code model files
packages/http-client-csharp/generator/TestProjects/**/tspCodeModel.json

# Alloy components
packages/emitter-framework/**/*.tsx
# auto generated api view properties files
packages/http-client-java/generator/http-client-generator-test/src/main/**/*.json
packages/http-client-java/generator/http-client-generator-clientcore-test/src/main/**/*.json
Expand Down
1 change: 0 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"plugins": [
"./packages/prettier-plugin-typespec/dist/index.js",
"./node_modules/prettier-plugin-organize-imports/index.js",
"@alloy-js/prettier-plugin-alloy",
"prettier-plugin-astro",
"prettier-plugin-sh"
],
Expand Down
1 change: 0 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ const jsxFilesConfig = tsEslint.config({
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
},
ignores: ["packages/emitter-framework/**/*", "packages/http-client/**/*"],
});

export const TypeSpecCommonEslintConfigs = [
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
"prettier": "~3.4.2",
"prettier-plugin-astro": "^0.14.1",
"prettier-plugin-organize-imports": "~4.1.0",
"@alloy-js/prettier-plugin-alloy": "~0.1.0",
"prettier-plugin-sh": "^0.14.0",
"rimraf": "~6.0.1",
"syncpack": "^13.0.0",
Expand All @@ -87,8 +86,7 @@
},
"pnpm": {
"overrides": {
"@fluentui/react-theme": "9.1.17",
"esbuild": "0.23"
"@fluentui/react-theme": "9.1.17"
}
}
}
19 changes: 12 additions & 7 deletions packages/compiler/src/lib/decorators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,20 @@ import {
getPropertyType,
isIntrinsicType,
validateDecoratorNotOnType,
validateDecoratorUniqueOnNode,
} from "../core/decorator-utils.js";
import { getDeprecationDetails, markDeprecated } from "../core/deprecation.js";
import { compilerAssert, ignoreDiagnostics, reportDeprecated } from "../core/diagnostics.js";
import { getDiscriminatedUnion, getTypeName } from "../core/helpers/index.js";

import {
Numeric,
StdTypeName,
compilerAssert,
getDiscriminatedUnion,
getTypeName,
ignoreDiagnostics,
isArrayModelType,
isValue,
reportDeprecated,
validateDecoratorUniqueOnNode,
} from "../core/index.js";
import {
Discriminator,
DocData,
Expand All @@ -67,9 +75,7 @@ import {
setMinValueExclusive,
} from "../core/intrinsic-type-state.js";
import { createDiagnostic, reportDiagnostic } from "../core/messages.js";
import { Numeric } from "../core/numeric.js";
import { Program, ProjectedProgram } from "../core/program.js";
import { isArrayModelType, isValue } from "../core/type-utils.js";
import {
AugmentDecoratorStatementNode,
DecoratorContext,
Expand All @@ -86,7 +92,6 @@ import {
ObjectValue,
Operation,
Scalar,
StdTypeName,
SyntaxKind,
Type,
Union,
Expand Down
2 changes: 1 addition & 1 deletion packages/compiler/src/lib/key.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Program } from "../core/program.js";
import { Program } from "../core/index.js";
import { ModelProperty, Type } from "../core/types.js";
import { useStateMap } from "../utils/index.js";
import { createStateSymbol } from "./utils.js";
Expand Down
10 changes: 6 additions & 4 deletions packages/compiler/src/lib/paging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ import type {
PageSizeDecorator,
PrevLinkDecorator,
} from "../../generated-defs/TypeSpec.js";
import { createDiagnosticCollector } from "../core/diagnostics.js";
import { getTypeName } from "../core/helpers/type-name-utils.js";
import {
createDiagnosticCollector,
isArrayModelType,
navigateProgram,
Program,
} from "../core/index.js";
import { createDiagnostic, reportDiagnostic } from "../core/messages.js";
import { Program } from "../core/program.js";
import { navigateProgram } from "../core/semantic-walker.js";
import { isArrayModelType } from "../core/type-utils.js";
import type {
DecoratorContext,
DecoratorFunction,
Expand Down
5 changes: 2 additions & 3 deletions packages/compiler/src/lib/service.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { ServiceDecorator } from "../../generated-defs/TypeSpec.js";
import { validateDecoratorUniqueOnNode } from "../core/decorator-utils.js";
import { reportDeprecated } from "../core/diagnostics.js";
import { getTypeName } from "../core/helpers/type-name-utils.js";
import { Type, getTypeName, reportDeprecated } from "../core/index.js";
import { reportDiagnostic } from "../core/messages.js";
import type { Program } from "../core/program.js";
import { DecoratorContext, Namespace, Type } from "../core/types.js";
import { DecoratorContext, Namespace } from "../core/types.js";
import { useStateMap } from "../utils/index.js";

export interface ServiceDetails {
Expand Down
6 changes: 2 additions & 4 deletions packages/compiler/test/e2e/scenarios/scenarios.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,14 @@ describe("compiler: entrypoints", () => {
expectDiagnosticEmpty(program.diagnostics);
});

// FIXME: Fix before merge!
it.skip("succeed if loading different install of the same library at the same version", async () => {
it("succeed if loading different install of the same library at the same version", async () => {
const program = await compileScenario("same-library-same-version", {
emit: ["@typespec/lib2"],
});
expectDiagnosticEmpty(program.diagnostics);
});

// FIXME: Fix before merge!
it.skip("emit error if loading different install of the same library at different version", async () => {
it("emit error if loading different install of the same library at different version", async () => {
const program = await compileScenario("same-library-diff-version", {
emit: ["@typespec/lib2"],
});
Expand Down
Loading

0 comments on commit 5b4812f

Please sign in to comment.