-
Notifications
You must be signed in to change notification settings - Fork 134
Print warnings to stderr #475
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
Conversation
Co-Authored-By: Jan Hrcek <honza.hrk@gmail.com>
added webpack config instructions and made corrections on other getting started docs
Also update to Dhall 1.27
* filter out files in .spago folder from watch list * add purescript#430 to changelog * Update src/Spago/Build.hs Co-Authored-By: Jan Hrcek <honza.hrk@gmail.com> * fix build by importing split directories * added step-by-step guide to setting up a spago + parcel project to documentation * cleanup * changelog
… logWarning, and logError fns
f-f
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Benjmhart looks great! 👏
One thing that I feel I didn't clarify enough in #256 (comment) is that I'd like something like logInfo (and I guess we'd need logInfoStr too) to replace most of the current usages of echo - i.e. all "application logging" should go to stderr - so then we'd use echo/output for "application output", in commands like spago sources, spago list-packages, spago run, etc
Co-Authored-By: Fabrizio Ferrai <fabrizio.ferrai@gmail.com>
|
I'll do a follow up PR with the logInfo fn |
|
@Benjmhart it might be that you missed the update for some of the fixtures. Note that in the failing tests there are two different fixtures being checked, depending on the presence of These tests also make use of verbose output so we might need to match both stderr and stdout |
|
hmm these tests fail for different reasons on my local environment, but I'll make adjustments based on the CI results. @f-f - I'm getting several tests failing with this IOException of type invalidArgument is there some missing environmental dependency for tests that you can think of that should be documented, perhaps in the CONTRIBUTING.md file? |
|
@f-f not quite sure what the root of this is, all these control characters weren't present in the original text file. maybe this was being emitted to stderr before and it wasn't being tested? for the moment I'll just add a function to either clear or unescape the ANSI codes so it can be sanely compared to the fixture file |
|
hm, at this point i'm going to stop until I can get the test suite running correctly. let me know if you have any idea what the cause of the original invalid byte sequence error might be |
|
ok, looks like I've resolved the issues in pipeline. sorry for that. I've documented the issue under the 'running tests' section of CONTRIBUTING.md so others can work around it. |
|
@Benjmhart sorry for the trouble! The escape sequences should be there because ..if the encoding is correct, which is what you figured afterwards. However, rather than asking users/devs to set envvars to run tests, let's just set UTF8 encoding by default. The way we do it in other places is by calling I think for setting this up with our test machinery is the following (documented here):
Could you try to see if this works? |
|
@f-f unfortunately stack will not compile the test suites using that technique, at least on my system, I'm getting an error: I assume this is a GHC error resulting from the options in the HSpec docs. if you're not sure how to resolve I may open an issue with Hspec, as I don't see any documentation on this issue This was with the /test/Spec.hs file and /test/Main.hs file as you described anyhow, I've resolved conflicts, run a test build, and removed the stripAnsi machinery. the test passes locally. let me know if these needs further adjustment, or if you'd like me to pursue the issue on HSpec, I'm happy to put in more work to get this where it needs to be. |
|
@Benjmhart right, I forgot to mention that you need to add Thank you for the great work! 💯 |
|
@f-f facepalm I knew it was something obvious. thanks for your help & patience. I'll start work on a PR for application output vs application logging over the next few days. |
|
@Benjmhart you're welcome 🙂 |



Description of the change
As detailed in #256
This PR renames
echoandechoStrtooutput&outputStrfor stdout operations(if there was a different expectation about the implementation details of
outputlet me know)It also adds
logDebug,logWarning, andlogError(and removes echoDebug).This appeared to break two tests, which have an adjusted implementation to account for both stderr and stdout.
Checklist:
READMEP.S.: the above checks are not compulsory to get a change merged, so you may skip them. However, taking care of them will result in less work for the maintainers and will be much appreciated 😊