-
Notifications
You must be signed in to change notification settings - Fork 519
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
Skip verification of dependencies in compile time. How ? #1267
Comments
What do you mean by skipping verifications of dependencies? Rebar3 currently does not allow that to happen if I interpret it as 'skipping making sure the deps are in place and compiled'. |
Yes, you interpreted right. Rebar2 had option to skip it, but rebar3 have no this option, and i should spend my time for every run |
There isn't a way to do it right now and I don't think we have any way planned for it at the moment. I don't think we would be closed to a way to work around it, but all the commands in rebar3 may declare one or more dependencies that get executed before their own provider. As such, if the |
@loguntsov it doesn't take anytime. It only verifies that that they exist before compiling your apps that depend on them. |
I'll close this one as I don't think this will be happening, since it does not fit the current design. The bare compiler as |
@ferd can you highlight what the troublesome areas are to make this happen? Is it just a matter of putting the time in or is it something you are fundamentally opposed to? |
I'm fundamentally opposed unless it can be shown to be an issue. Maybe on projects with an extremely large number of dependencies it can be shown there is N seconds of time spent that is unacceptable. That could change my opposition. |
Couple times of runs for debugging:
@tsloughter you see i'm wasting 10-15 seconds to check dependencies. it's going to the server to check something every time. So i wanna skip this step. |
If the time is spent on fetching the repo because of a missing plugin why aren't you removing |
Because i just want skip this step for my debugging. I know project is compiled, and i want just run it. I don't need check something everytime when i need launch it. Just give us this way. What we are asking you. |
For me it's about dependencies that are built somewhere else and where the result of the compilation will be bundled with the rest later. We will probably come up with a work around but I wanted to first probe to see if there was any willingness to merge such a solution upstream. |
@loguntsov your issue won't be solved by skipping dep verification, it is a plugin that is your issue. |
I had many projects since start of this topic, it is not the same. Many projects have this trouble. It doesn't mean that i should fix all them by overides. Another question from other point. How i can start application (like shell) without something else like dependencies and others ? Yes i can use simple erl command, but what about rebar3 with his profiles and another possibilities. |
@Zalastax oh, hm, that is an interesting case. But if the dependencies aren't needed when building why have them in the deps list at all? It is possible we'd accept a PR that allows for skipping dependencies. But keep in mind that it needs to not cause issues with providers that Another issue is paths. rebar3 doesn't simply add everything in Those issues and possibly others would have to be figured out if it were to be a feature in rebar3. On the other hand a plugin would be simple. Have a
with
Using that plugin as a |
@loguntsov do you mean how to start the shell even if the project isn't compiling? That is something I've wanted to fix as I've found it annoying at times. However if you just want it to not start applications you can do Because of the way rebar3 provider dependencies work it isn't so easy to have a version of shell that doesn't compile the project, so the way right now is to use
That will bring up a shell with everything, including tests and test deps, in the code path. |
@tsloughter we primarily need the source files from the dependencies. Resolving the dependencies but then not building them seemed like the smoothest and fastest solution but we are also looking into creating a plugin that downloads our built artifacts instead. |
No. As Tristan mentioned, the entire Rebar3 project works by having tasks depend on other tasks to work. The deps handling task loads the applications in the path, the lock task takes the deps and ensures they're well-represented in the lock file, and the compile task is what ensures they are compiled (if they are compiled they do not get recompiled -- if they do, that's a different bug). This is automated because compile depends on lock, which depends on get-deps, which depends on application_discovery (finds top level apps). Asking to 'compile without caring about the deps' is essentially asking to change how the entire rebar3 model works. You know the project is debugged, but Rebar3 does not. It needs to check and ensure that all artifacts are there for a build so that you don't get a crash every time, and that it can take corrective action otherwise. That's why when you call That was a conscious decision made there. As Tristan says, if we can find a way to 'skip the compilation of deps' then sure that could be done, but it doesn't mean you could skip it when calling You can come in and ask to "just give you the feature", but what I'm telling you is that doing that would not necessarily accomplish much of what you want. Like sure you can now run @Zalastax this is what I meant by "does not fit the current design". As Tristan mentioned, rebar3 does not grab everything in |
Thanks for all the insight you have provided here. The suggestion by @tsloughter is looking fruitful and I'm confident my team will be able to make the pipeline fit our needs. I'm not sure if we can avoid downloading the artifacts but we'll be able to avoid recompiling them. We'll investigate some more and I'll reach out to you if we think it can be integrated with the rest of the ecosystem. |
One other thing to note is that if an app has beam files in a top-level ebin/ directory, those are copied as-is to the build directory. |
Didn't found way to skip verification of dependencies in compile time. How i can do that ?
I think it is important feature which allow save much time.
What is right flow for debugging of code ?
Thanks.
The text was updated successfully, but these errors were encountered: