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 PrepareV2.ts when running on windows #69

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

codingismy11to7
Copy link
Contributor

@codingismy11to7 codingismy11to7 commented Jan 10, 2025

there's logic based on slashes in regexes, which of course don't work on windows where the paths contain backslashes instead.

Type

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

the PrepareV2 code assumed non-windows machines

Related

  • Related Issue #
  • Closes #

there's logic based on slashes in regexes, which of course don't work on windows where the paths contain backslashes instead.
Copy link

changeset-bot bot commented Jan 10, 2025

🦋 Changeset detected

Latest commit: 881da20

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@effect/build-utils Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codingismy11to7
Copy link
Contributor Author

codingismy11to7 commented Feb 3, 2025

gonna bump this. i used the officially-recommended-in-the-docs create-effect-app template (or whatever it's called) to create a project, and that project does not build on windows.

i only ran macs for many years, but these days i HATE macos, and I just checked - my 5-year-old windows box that i paid ~$5,000 for would cost over $11,000 today if it was a Mac Pro with similar specs (https://imgur.com/a/GvzicM3). i don't think overlooking windows users is great in this day and age (but i would have been all for blowing them off just 5 or 10 years ago)

edit: this was interpreted on discord as me saying that effect is, like, purposefully excluding Windows - never thought that at all, this same basic bug has been encountered countless times across countless projects - but I see how what I said could have been misinterpreted

@adrian-gierakowski
Copy link

that project does not build on windows

vanilla windows or WSL?

@codingismy11to7
Copy link
Contributor Author

this is all just plain windows, hence the / vs \ problem

@codingismy11to7
Copy link
Contributor Author

codingismy11to7 commented Feb 3, 2025

i just removed my patch, reinstalled, and re-codegen'ed to show what happens on windows:

Codegen'ed file
export * as AppApi from "./AppApi.js"


export * as Authentication from "./Authentication.js"


export * as Autos from "./Autos.js"


export * as BackupMetadata from "./BackupMetadata.js"


export * as ContentType from "./ContentType.js"


export * as Errors from "./Errors.js"


export * as MiscSchemas from "./MiscSchemas.js"


export * as OAuthToken from "./OAuthToken.js"


export * as OAuthUserInfo from "./OAuthUserInfo.js"


export * as SecureUserPreferences from "./SecureUserPreferences.js"


export * as Session from "./Session.js"


export * as TimeZone from "./TimeZone.js"


export * as User from "./User.js"


export * as apis\AccountApi from "./apis\AccountApi.js"


export * as apis\AuthApi from "./apis\AuthApi.js"


export * as apis\AutosApi from "./apis\AutosApi.js"


export * as apis\ImageApi from "./apis\ImageApi.js"


export * as apis\PreferencesApi from "./apis\PreferencesApi.js"


export * as apis\SessionApi from "./apis\SessionApi.js"


export * as apis\SignupApi from "./apis\SignupApi.js"


export * as models\AutosModel from "./models\AutosModel.js"

@codingismy11to7
Copy link
Contributor Author

codingismy11to7 commented Feb 3, 2025

by request, here's the generated file after the fix: https://github.com/codingismy11to7/guzzler/blob/main/packages/domain/src/index.ts

contents
export * as AppApi from "./AppApi.js";

export * as Authentication from "./Authentication.js";

export * as Autos from "./Autos.js";

export * as BackupMetadata from "./BackupMetadata.js";

export * as ContentType from "./ContentType.js";

export * as Errors from "./Errors.js";

export * as MiscSchemas from "./MiscSchemas.js";

export * as OAuthToken from "./OAuthToken.js";

export * as OAuthUserInfo from "./OAuthUserInfo.js";

export * as SecureUserPreferences from "./SecureUserPreferences.js";

export * as Session from "./Session.js";

export * as TimeZone from "./TimeZone.js";

export * as User from "./User.js";

export * as AccountApi from "./apis/AccountApi.js";

export * as AuthApi from "./apis/AuthApi.js";

export * as AutosApi from "./apis/AutosApi.js";

export * as ImageApi from "./apis/ImageApi.js";

export * as PreferencesApi from "./apis/PreferencesApi.js";

export * as SessionApi from "./apis/SessionApi.js";

export * as SignupApi from "./apis/SignupApi.js";

export * as AutosModel from "./models/AutosModel.js";

@IMax153 IMax153 merged commit 3932c07 into Effect-TS:main Feb 3, 2025
@github-actions github-actions bot mentioned this pull request Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants