Coder Social home page Coder Social logo

Building issues on multiple platforms about h5 HOT 11 CLOSED

 avatar commented on June 1, 2024
Building issues on multiple platforms

from h5.

Comments (11)

theolivenbaum avatar theolivenbaum commented on June 1, 2024

@hardhub This is due to the update of h5 to target net70, which needs then the SDK installed on your computer.
You can download the latest .NET SDK here: https://dotnet.microsoft.com/en-us/download
And re-install the latest version of h5 with the command: dotnet tool update --global h5-compiler --version 0.0.34002

from h5.

 avatar commented on June 1, 2024

I wrote above about NET 7.

And I obviously tested it on .NET 7.

dotnet --version
7.0.100

You closed it too quick ))

from h5.

theolivenbaum avatar theolivenbaum commented on June 1, 2024

Good point, missed that!

from h5.

 avatar commented on June 1, 2024

For build output you can see this comment: #71 (comment)

>C:\Users\hardhub\.nuget\packages\h5.target\0.0.34005\Sdk\Sdk.targets(461,5): warning MSB3073: The command "h5 check-if-online" exited with code 9009.
1>Cannot find a tool in the manifest file that has a command named 'h5'.
1>C:\Users\hardhub\.nuget\packages\h5.target\0.0.34005\Sdk\Sdk.targets(470,5): warning MSB3073: The command "dotnet tool run h5 check-if-online" exited with code 1.

I was not able to look at Sdk targets to analyze anything because I just completed porting some Bridge frameworks projects and the project based on Bridge in the past.
I wrote about frameworks in Gitter: https://gitter.im/curiosityai/h5#. But it seems nobody uses it actively.

from h5.

theolivenbaum avatar theolivenbaum commented on June 1, 2024

Interesting, which version of VS do you have installed?
If you want to chat directly you can join our app slack.

from h5.

 avatar commented on June 1, 2024

Interesting, which version of VS do you have installed?

I guess it does not matter, because it happens even under gitlab-runner (CentOS 7, .NET 7, Microsoft Official Repository)

 h5 check-if-online
/home/gitlab-runner/.nuget/packages/h5.target/0.0.34005/Sdk/Sdk.targets(461,5): warning MSB3073: The command "h5 check-if-online" exited with code 134.

Difference only in exit code for different platforms, for VS and Windows it is 1 and for Linux it is any none-zero as I see that.

from h5.

theolivenbaum avatar theolivenbaum commented on June 1, 2024

The error code there is on purpose, as we need to start the compilation server - we do it this way because the compiler caches some of the state in across compilations for speed.

For CIs, we don't run the compiler as server, as you can see here.

The reason you always see the error code is that we run two checks, one for the globally installed compiler, and one for the locally installed one. We run this to make sure you're running the latest version of the compiler, because I didn't want to support the complexity added by the original Bridge CLI that let you mix multiple versions of the CLI / compiler / base library.

All that said, I'm sure this can be improved - either by adding some flags to disable this process, or something else. I'll leave this open to track the issue

from h5.

 avatar commented on June 1, 2024

Thank for good explanation.

As I see it we need to inform calling code about status of server:

try
{
    await remoteCompiler.Ping(_exitToken.Token);
    Logger.LogInformation("Found compilation server");
    return 0;
}
catch (Exception E)
{
    Logger.LogInformation("Compilation server not online");
    return 1;
}

It is a bit unclear for me what calls this tool. And why we need to tell some number outside - why we cannot just start it silently and always return 0.

Because on my screenshot above it looks like it returns 1 even if H5 is already started.
So I can track output in console of H5 server, I can observe how it builds a project, but warning check-if-online exited with code 1 continues to be added into Error List for each project which it starts to build.
Maybe it raises exception if H5 is already started for another H5-based project in solution and it is the reason why it returns 1?

I guess I will need to analyze implementation details to be more specific.

from h5.

 avatar commented on June 1, 2024

And if I build using multiple threads via CLI (for example `msbuild /maxcpucount:8 instead of /maxcpucount:1) then I get warnings about h5-compiler:

The command "dotnet tool update --global h5-compiler" exited with code 1.

from h5.

theolivenbaum avatar theolivenbaum commented on June 1, 2024

@hardhub I've changed the logic in the SDK target to ignore the exit code and instead use the exit code value, this should fix this warning (but you'll need to update the SDK target in your projects

from h5.

theolivenbaum avatar theolivenbaum commented on June 1, 2024

Just remembered there's an auto-update of the target value in the compiler so as long as you update the compiler it should be fine!

from h5.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.