-
Notifications
You must be signed in to change notification settings - Fork 739
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 Windows line separation. #949
base: main
Are you sure you want to change the base?
Conversation
@szarpul I'm afraid your fix is not multiplatform? have you tested it on Mac, Linux and Wind? |
Hey @tzolov , I tested it only on Windows. Nevertheless, the fix should not affect other platforms as they don't have \r\n line separation. |
@nichozhan I would avoid using |
@tzolov I've tested it on Linux using docker image maven:eclipse-temurin-17 with a command |
ea2eedd
to
b1d59fd
Compare
In the issues that came up around this topic, it seems there are different opinions. Is the intention that everything only has If the tests are flaky because they don't use Thoughts? |
Hey @markpollack thanks for the reply!
I would say it's the other way around, the tests are flaky because of the use of If that's correct that
|
* `BeanOutputConverter` - replace all Windows line separation with \n. * `BeanOutputConverterTest` - explicitly check line separation using \n. * Introduce `TextBlockAssertion` that asserts text blocks with line separation set to \n. (cherry picked from commit e20c9d6)
* After the fix done in spring-projects#944, the tests were still not passing. * Following the fix for spring-projects#944, we should compare text blocks against normalized EOL. * If our goal is to have normalized EOL, then there is no sens to hardcode a `\n` as the target value in `BeanOutputConverterTest.normalizesLineEndingsClassType` test.
b1d59fd
to
2404f07
Compare
Hey @markpollack @tzolov
I have updated the PR. WDYT? |
Thanks for hanging in there on this. I'll dive back in and take a look. The way this reads now has me a bit confused. It looks like there isn't portability in text blocks across platforms? The related issue #595 is about I've created a 'cross-platform' label to track / group better |
Hey @markpollack To clarify the situation, it all comes to one thing, somwhere in the production code the
BeanOutputConverterTestIn the method
ContentFormatterTestsThis test runs the
PromptTemplateTest
Wrap upWe could either explicitly specify to have the WDYT? |
Bug fix for #595
BeanOutputConverter
- replace all Windows line separation with \n.BeanOutputConverterTest
- explicitly check line separation using \n.TextBlockAssertion
that asserts text blocks with line separation set to \n.