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

Introspection doesn't add or loses trailing new line of schema file #2854

Closed
janpio opened this issue Jun 25, 2020 · 1 comment · Fixed by prisma/prisma-engines#868
Closed
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. topic: introspection topic: re-introspection
Milestone

Comments

@janpio
Copy link
Member

janpio commented Jun 25, 2020

Bug description

When I use --experimental-reintrospection the trailing new line that I had in my schema file was removed:

C:\Users\Jan\Documents\throwaway\reinstrospection>git diff
warning: LF will be replaced by CRLF in prisma/schema.prisma.
The file will have its original line endings in your working directory
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index 4042677..a304d00 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -36,4 +36,4 @@ model User {
   profile Profile?

   @@map("users")
-}
+}
\ No newline at end of file

image

How to reproduce

Follow #2425 (comment)

Expected behavior

Trailing new line is kept.

Prisma information

@prisma/cli : 2.1.1

@janpio janpio added bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. topic: re-introspection labels Jun 25, 2020
@pantharshit00 pantharshit00 changed the title Re-Introspection loses trailing new line of schema file Introspection loses trailing new line of schema file Jun 26, 2020
@pantharshit00
Copy link
Contributor

Same is true for introspection itself. Introspection doesn't add the trailing space.

I tested it out with 2.2.0-dev.15

@pantharshit00 pantharshit00 added bug/2-confirmed Bug has been reproduced and confirmed. and removed bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. labels Jun 26, 2020
@janpio janpio changed the title Introspection loses trailing new line of schema file Introspection doesn't add or loses trailing new line of schema file Jun 26, 2020
@janpio janpio added this to the 2.2.0 milestone Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. topic: introspection topic: re-introspection
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants