Skip to content

fix(init): define working directory in check task for init script#2852

Merged
marvinhagemeister merged 18 commits intodenoland:mainfrom
iuioiua:fix-fmt-lint
Apr 22, 2025
Merged

fix(init): define working directory in check task for init script#2852
marvinhagemeister merged 18 commits intodenoland:mainfrom
iuioiua:fix-fmt-lint

Conversation

@iuioiua
Copy link
Contributor

@iuioiua iuioiua commented Apr 14, 2025

This fixes CI for current PRs until denoland/deno#28655 is added to Deno 2.3.0.

This fixes CI until denoland/deno#28923 is fixed. Then, we can use Deno.makeTempDir() and not have to use tmp_*/.

@iuioiua iuioiua changed the title fix(init): define working directory in check task for init workflow fix(init): define working directory in check task for init script Apr 15, 2025
@iuioiua iuioiua marked this pull request as ready for review April 15, 2025 00:05
@kt3k
Copy link
Contributor

kt3k commented Apr 15, 2025

CI failures seem caused by #2837

The test case creates temp directory at the path path/to/fresh/tmp_<random_hex>, but that path is now included in .gitignore. deno fmt and deno lint excludes the paths that matches with .gitignore, causing error: No target files found.

@iuioiua
Copy link
Contributor Author

iuioiua commented Apr 15, 2025

deno fmt and deno lint excludes the paths that matches with .gitignore, causing error: No target files found.

Sorry, I'm not understanding. Perhaps something obvious I'm missing, but there are plenty of other paths that don't match path/to/fresh/tmp_<random_hex>. Why are these other paths not found?

@kt3k
Copy link
Contributor

kt3k commented Apr 15, 2025

The failing test case init with tailwind - fmt, lint, and type check project initializes the project at the path fresh/tmp_<random_hex> (with fresh's init template populated in there), and run deno task check in that folder, something equivalent of:

deno run -A -r https://fresh.deno.dev tmp_12345
cd tmp_12345
deno task check

and this entire tmp_12345 directory is ignored by .gitignore settings at the root, that causes deno lint to fail finding target files

@kt3k
Copy link
Contributor

kt3k commented Apr 15, 2025

Try remove this line

await Deno.remove(dir, { recursive: true });
and run the test cases. You'll see tmp_<hash> folder remaining at the root of the repo

@iuioiua iuioiua marked this pull request as draft April 16, 2025 00:10
@iuioiua iuioiua marked this pull request as ready for review April 22, 2025 08:05
@iuioiua
Copy link
Contributor Author

iuioiua commented Apr 22, 2025

@kt3k and @marvinhagemeister, I think this is fine to merge as is for now to unblock CI. We can revert the check task by before the next release.

Copy link
Contributor

@marvinhagemeister marvinhagemeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@marvinhagemeister marvinhagemeister merged commit 1495099 into denoland:main Apr 22, 2025
7 checks passed
@iuioiua iuioiua deleted the fix-fmt-lint branch April 22, 2025 11:18
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