Skip to content

Add --logfile option and trace all output to this file  #501

Closed

Description

@vasily-kirichenko

Sometimes paket restore --references-files fails with code 1 and it's impossible to understand what's went wrong. Build server log contains the following:

"...aproject.csproj" (Rebuild target) (46:2) ->
[12:43:07][Step 3/3]        (RestorePackages target) -> 
[12:43:07][Step 3/3]          ...\.paket\paket.targets(36,5): error MSB3073: The command ""...\.paket\paket.exe" restore --references-files "...aproject\paket.references"" exited with code 1. 

It would be great if Paket writes error message / full stack trace into stdout (or whatever place such that TeamCity can consume it and show in its logs) in case of error.

Activity

  1. forki commented on Jan 2, 2015

    @forki
    Member

    mhm, not sure how to do this. It seems all messages are eaten by MsBuild

  2. vasily-kirichenko commented on Jan 2, 2015

    @vasily-kirichenko
    ContributorAuthor

    Am I right that paket.exe returns non-zero error code if an unhandled exception occures?

  3. forki commented on Jan 2, 2015

    @forki
    Member

    on every error.

  4. forki commented on Jan 2, 2015

    @forki
    Member

    (this will probably be improved when we moved to railway oriented programming)

  5. vasily-kirichenko commented on Jan 2, 2015

    @vasily-kirichenko
    ContributorAuthor

    How can Either monad style design help with it? The whole paket will be a function of type unit -> Choice<_, exn> or something like this and you will able to get exn in case of Choice2Of2, but it's not different from try <do the whole paket logic here> with e -> ....

    Can paket.exe write exceptions in a (optional) log file? It'd allow to investigate errors.

  6. forki commented on Jan 2, 2015

    @forki
    Member

    what would be a good location for such a file?

  7. vasily-kirichenko commented on Jan 2, 2015

    @vasily-kirichenko
    ContributorAuthor

    User's temp folder I think.

  8. vasily-kirichenko commented on Jan 2, 2015

    @vasily-kirichenko
    ContributorAuthor

    And it would be great if location of this file appears in teamcity log.

  9. forki commented on Jan 2, 2015

    @forki
    Member

    then we're back to the beginning. ;-)

    We need to figure out why teamcity/MsBuild supresses the output.

  10. vasily-kirichenko commented on Jan 2, 2015

    @vasily-kirichenko
    ContributorAuthor

    I think if we pass log file path as an explicit argument, it would be enough to easily find it later.

  11. changed the title [-]paket restore --references-files fails silently[/-] [+]Add - g[/+] on Jan 2, 2015
  12. changed the title [-]Add - g[/-] [+]Add --logfile option and trace all output to this file [/+] on Jan 2, 2015
  13. added a commit that references this issue on Jan 2, 2015
    9ca1f0c
  14. added a commit that references this issue on Jan 2, 2015
    a752e3d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions