Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: lifted mutables become immutable #211

Merged
merged 1 commit into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion checks/check.test.w
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ test "run() with failure" {
expect.equal(check.latest()?.ok, false);
}

let check_id = nodeof(check).id;
test "check name is set" {
expect.equal("check {check.node.id}", "check {checkName}");
expect.equal("check {check_id}", "check {checkName}");
}
6 changes: 3 additions & 3 deletions checks/check.w
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ pub class Check impl ICheck {
checkpath: str;

new(handler: inflight (): void, props: CheckProps?) {
this.checkid = std.Node.of(this).addr;
this.checkpath = std.Node.of(this).path;
this.checkid = nodeof(this).addr;
this.checkpath = nodeof(this).path;
this.results = r.Results.of(this);

let wrapper = inflight (): str => {
log("running check {this.node.path} ({this.checkid})...");
log("running check {this.checkpath} ({this.checkid})...");
let ts = datetime.utcNow().toIso();

let var result: r.CheckResult = {
Expand Down
4 changes: 2 additions & 2 deletions checks/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@winglibs/checks",
"version": "0.0.9",
"version": "0.0.10",
"description": "Cloud checks",
"publishConfig": {
"access": "public",
Expand All @@ -26,4 +26,4 @@
]
},
"license": "MIT"
}
}
4 changes: 2 additions & 2 deletions react/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@winglibs/react",
"description": "React library for Wing",
"version": "0.0.2",
"version": "0.0.3",
"author": {
"name": "Meir Elbaz",
"email": "[email protected]"
Expand All @@ -24,4 +24,4 @@
"serve-static": "^1.15.0",
"tree-kill": "^1.2.2"
}
}
}
7 changes: 4 additions & 3 deletions react/sim.w
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ pub class AppSim extends api.AppBase impl api.IApp {
"// This file is generated by wing\nwindow.wingEnv = {Json.stringify(this.env)};",
);

this.env.set("PORT", "{port}");
let env = this.env.copyMut();
env.set("PORT", "{port}");

if this.props.useBuildCommand? == true {
util.shell(this.buildCommand, env: this.env.copy(), cwd: this.path, inheritEnv: true);
util.shell(this.buildCommand, env: env.copy(), cwd: this.path, inheritEnv: true);

return utils.Utils.serveStaticFiles(this.buildDir, port);
}

return utils.Utils.exec(this.startCommand, this.env, this.path);
return utils.Utils.exec(this.startCommand, env, this.path);
});

service.addEnvironment("HOME", util.env("HOME"));
Expand Down
4 changes: 2 additions & 2 deletions tsoa/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@winglibs/tsoa",
"description": "TSOA library for Wing",
"version": "0.1.5",
"version": "0.1.6",
"author": {
"email": "[email protected]",
"name": "Eyal Keren"
Expand All @@ -25,4 +25,4 @@
"tsup": "^8.0.2",
"typescript": "^5.4.4"
}
}
}
2 changes: 1 addition & 1 deletion tsoa/sim.w
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub class Service_sim impl types.IService {
options: props,
homeEnv: homeEnv,
pathEnv: pathEnv,
clients: this.clients.copy(),
clients: this.clients,
lastPort: lastPort,
);
this.state.set("port", "{res.port()}");
Expand Down
2 changes: 1 addition & 1 deletion tsoa/tfaws.w
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ pub class Service_tfaws impl types.IService {
);

this.func = new TSOAFunction({ RegisterRoutes: res.routesFile }, inflight (event, context) => {
return Service_tfaws.runHandler(event, context, this.clients.copy());
return Service_tfaws.runHandler(event, context, this.clients);
});

let awsFn = aws.Function.from(this.func.fn)!;
Expand Down
Loading