Skip to content
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

AutoDJ: Add Random Track Control to AutoDJ. #3076

Merged
merged 4 commits into from
Nov 3, 2020
Merged

AutoDJ: Add Random Track Control to AutoDJ. #3076

merged 4 commits into from
Nov 3, 2020

Conversation

PawBud
Copy link
Contributor

@PawBud PawBud commented Sep 4, 2020

This PR aims to implement the wishlist Feature Request, Adding Control to Add Random Track to AutoDJ.
Discussions:-https://mixxx.zulipchat.com/#narrow/stream/109171-development/topic/Add.20Control.20to.20Add.20Random.20Track.20to.20AutoDJ
Feature Request:-https://bugs.launchpad.net/mixxx/+bug/1887845

@PawBud PawBud marked this pull request as draft September 4, 2020 16:19
@daschuer
Copy link
Member

daschuer commented Sep 4, 2020

This PR does currently not build:

/usr/bin/ld: libmixxx-lib.a(dlgautodj.cpp.o): in function `DlgAutoDJ::addRandomTrackButton(bool)':
dlgautodj.cpp:(.text+0x20): multiple definition of `DlgAutoDJ::addRandomTrackButton(bool)'; libmixxx-lib.a(mocs_compilation.cpp.o):mocs_compilation.cpp:(.text+0x5370): first defined here
/usr/bin/ld: libmixxx-lib.a(dlgautodj.cpp.o): in function `DlgAutoDJ::addRandomTrackButton(bool)':
dlgautodj.cpp:(.text+0x28): undefined reference to `AutoDJProcessor::addRandomTrack()'
/usr/bin/ld: libmixxx-lib.a(mocs_compilation.cpp.o): in function `AutoDJProcessor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)':
mocs_compilation.cpp:(.text+0x1e4ce): undefined reference to `AutoDJProcessor::addRandomTrack()'
/usr/bin/ld: libmixxx-lib.a(autodjprocessor.cpp.o): in function `AutoDJProcessor::controlAddRandomTrack(double)':
autodjprocessor.cpp:(.text+0xab): undefined reference to `AutoDJProcessor::addRandomTrack()'

Copy link
Member

@daschuer daschuer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We like to have all commits build. So please rebase and sqash the commits after they are building again.

src/library/autodj/autodjprocessor.cpp Outdated Show resolved Hide resolved
src/library/autodj/dlgautodj.cpp Outdated Show resolved Hide resolved
src/library/autodj/dlgautodj.cpp Outdated Show resolved Hide resolved
@PawBud
Copy link
Contributor Author

PawBud commented Sep 5, 2020

This PR does currently not build:

/usr/bin/ld: libmixxx-lib.a(dlgautodj.cpp.o): in function `DlgAutoDJ::addRandomTrackButton(bool)':
dlgautodj.cpp:(.text+0x20): multiple definition of `DlgAutoDJ::addRandomTrackButton(bool)'; libmixxx-lib.a(mocs_compilation.cpp.o):mocs_compilation.cpp:(.text+0x5370): first defined here
/usr/bin/ld: libmixxx-lib.a(dlgautodj.cpp.o): in function `DlgAutoDJ::addRandomTrackButton(bool)':
dlgautodj.cpp:(.text+0x28): undefined reference to `AutoDJProcessor::addRandomTrack()'
/usr/bin/ld: libmixxx-lib.a(mocs_compilation.cpp.o): in function `AutoDJProcessor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)':
mocs_compilation.cpp:(.text+0x1e4ce): undefined reference to `AutoDJProcessor::addRandomTrack()'
/usr/bin/ld: libmixxx-lib.a(autodjprocessor.cpp.o): in function `AutoDJProcessor::controlAddRandomTrack(double)':
autodjprocessor.cpp:(.text+0xab): undefined reference to `AutoDJProcessor::addRandomTrack()'

So Sorry about this, It was pretty reckless of me to not notice that, I'll rebase the branch as you suggested.

@PawBud
Copy link
Contributor Author

PawBud commented Sep 6, 2020

Ok so, I guess I can't figure this one out
Screenshot from 2020-09-05 13-00-22
How do I resolve the 2 errors?

@daschuer
Copy link
Member

daschuer commented Sep 6, 2020

You screenshots are not that handy.
It would be better to just past the error message and ask explicit what you want to know.

@daschuer
Copy link
Member

daschuer commented Sep 6, 2020

If you address my inline comments, I think everything schould work.

@PawBud
Copy link
Contributor Author

PawBud commented Sep 7, 2020

Your screenshots are not that handy.
It would be better to just past the error message and ask explicit what you want to know.

/usr/bin/ld: libmixxx-lib.a(mocs_compilation.cpp.o): in function `AutoDJProcessor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)':
/home/pawbuddy/Desktop/OpenSource/mixxx/cmake_build/mixxx-lib_autogen/M6YM4VV6JB/moc_autodjprocessor.cpp:640: undefined reference to `AutoDJProcessor::addRandomTrack()'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/mixxx-test.dir/build.make:1546: mixxx-test] Error 1
make[1]: *** [CMakeFiles/Makefile2:1126: CMakeFiles/mixxx-test.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

I couldn't make anything out of this error, I mean it says that it's undefined but I don't really know where are the changes I am supposed to make? I even tried to make the changes u requested first, re-built my cmake_build dir and re-compiled it but the error persisted

@daschuer
Copy link
Member

daschuer commented Sep 7, 2020

You need to remove
slot:
addRandomTrack()
From
AutoDJProcessor class definition.
Currently Qt's moc is trying to link to it, but it is not there.

This commit introduces the Random Track Control to AutoDJ. It replaces
add_random with add_random_track in the whole codebase, and changing
the function names and QT class members to maintain consisistency.
@PawBud
Copy link
Contributor Author

PawBud commented Sep 8, 2020

@daschuer What more needs to be done?

@daschuer
Copy link
Member

daschuer commented Sep 8, 2020

Looks and works good. Once you have removed the draft state I can merge.

Would you mind to also add the new control here:
https://github.com/mixxxdj/mixxx/wiki/Mixxxcontrols

Thank you very much.

@PawBud PawBud marked this pull request as ready for review September 9, 2020 05:21
@PawBud
Copy link
Contributor Author

PawBud commented Sep 9, 2020

https://github.com/mixxxdj/mixxx/wiki/Mixxxcontrols#autodj over here, right?
I think the range will be binary and as for the What it does I can just add Adds a random track to the Auto DJ queue and for on screen feedback I can add Auto DJ Add Random Track ?

@ronso0
Copy link
Member

ronso0 commented Sep 9, 2020

yes, the range is binary, the description is also okay.
on-screen feedback is "Track is added to AutoDJ queue"

@Holzhaus
Copy link
Member

Holzhaus commented Sep 9, 2020

Please add a changelog entry to CHANGELOG.md.

@PawBud
Copy link
Contributor Author

PawBud commented Sep 9, 2020

Hope I added it at the right place :)

@PawBud
Copy link
Contributor Author

PawBud commented Sep 9, 2020

yes, the range is binary, the description is also okay.
on-screen feedback is "Track is added to AutoDJ queue"

Screenshot from 2020-09-09 19-48-27
Sorry about that mistake, should I increment all the leading numbers by 1?

CHANGELOG.md Outdated Show resolved Hide resolved
@PawBud
Copy link
Contributor Author

PawBud commented Sep 9, 2020

Done @Holzhaus

@ronso0
Copy link
Member

ronso0 commented Sep 9, 2020

Sorry about that mistake, should I increment all the leading numbers by 1?

Please don't. Those are just links to footnotes. I set it to 217 introduced in 2.3

@PawBud
Copy link
Contributor Author

PawBud commented Sep 10, 2020

Please don't. Those are just links to footnotes. I set it to 217 introduced in 2.3

Yea, sorry about that, I was confused with adding the footnote. Moreover, Is there anything left to do in this PR?

@ronso0
Copy link
Member

ronso0 commented Sep 10, 2020

Don't be sorry, I just wanted to save you from annoying, unnecessary work :)
Later on, we could restore the footwork links (or show the footnote on hover like with PR links?) and concatenate the version hints.

I did not look into the code. Someone else needs to review & merge.

@PawBud
Copy link
Contributor Author

PawBud commented Sep 10, 2020

Later on, we could restore the footwork links (or show the footnote on hover like with PR links?) and concatenate the version hints.

Yes! I was thinking of discussing things regarding the footwork in the wiki, Would love to work on it.

I did not look into the code. Someone else needs to review & merge.

Sure

@Holzhaus
Copy link
Member

Later on, we could restore the footwork links (or show the footnote on hover like with PR links?) and concatenate the version hints.

We should eventually move this from the wiki to the manual, then we get versioning for free.

@Be-ing Be-ing changed the base branch from master to main October 23, 2020 23:10
@Be-ing
Copy link
Contributor

Be-ing commented Oct 26, 2020

@Holzhaus anything left to do here? Ready to merge?

@Holzhaus
Copy link
Member

The pre-commit hooks fail.

@Holzhaus
Copy link
Member

Looks like the control documentation accidently ended up in the manual even though it hasn't been merged yet. I'll remove it: mixxxdj/manual#255 and you can open a new PR that adds it back (with .. versionadded:: 2.4.0) when this is ready to merge.

@Be-ing
Copy link
Contributor

Be-ing commented Oct 26, 2020

What about this is not ready to merge?

@Holzhaus
Copy link
Member

The pre-commit hooks fail.

@PawBud
Copy link
Contributor Author

PawBud commented Oct 30, 2020

The pre-commit hooks fail.
@Holzhaus, How can I be of help?

@Holzhaus
Copy link
Member

Click on the "Details" for the Travis Check, look at the output for the "pre-commit-pr" job and apply the diff from there.

To avoid future issues, I suggest you install our pre-commit hooks locally: https://github.com/mixxxdj/mixxx/wiki/Using-Git#set-up-automatic-code-checking

@PawBud
Copy link
Contributor Author

PawBud commented Oct 30, 2020

Click on the "Details" for the Travis Check, look at the output for the "pre-commit-pr" job and apply the diff from there.

So about this
Screenshot from 2020-10-30 17-01-45
Will this not introduce an inconsistency in our codebase?

@Holzhaus
Copy link
Member

It you installed the pre-commit hook, you won't be able to commit that patch as-is. The hook will detect the long lines and break it according to our code style.

@PawBud
Copy link
Contributor Author

PawBud commented Oct 30, 2020

It you installed the pre-commit hook, you won't be able to commit that patch as-is. The hook will detect the long lines and break it according to our code style.

ohh ok, Sure then, I'll commit the changes now, btw yes I did install it, thanks :)

@PawBud
Copy link
Contributor Author

PawBud commented Oct 31, 2020

@Holzhaus Is this ok?

@daschuer
Copy link
Member

daschuer commented Nov 3, 2020

Thank you for your first PR :-)

Before merge, you need to sign:
https://docs.google.com/a/mixxx.org/spreadsheet/viewform?formkey=dEpYN2NkVEFnWWQzbkFfM0ZYYUZ5X2c6M
please comment here when done.

@PawBud
Copy link
Contributor Author

PawBud commented Nov 3, 2020

@daschuer uhmm, so the thing is, this is my second pr, my first one was #3043 (comment), I had already signed the aforementioned form. Do I need to re-sign it?

@daschuer
Copy link
Member

daschuer commented Nov 3, 2020

Oh I am very sorry. I have missed to add you name to the Mixxx about box.
I will do now.
Nothing else to do for you.

@daschuer daschuer merged commit 21be90f into mixxxdj:main Nov 3, 2020
@Holzhaus
Copy link
Member

Holzhaus commented Nov 3, 2020

I'll take care of it this time, but please don't merge CO changes before a corresponding PR for the manual that documents the changes is ready to merge.

In this instance, we already have documentation because @PawBud added it to the wiki page before we migrated the control documentation to the wiki (reverted in mixxxdj/manual#255). I'll make a new PR that reverts that PR.

Holzhaus added a commit to Holzhaus/manual that referenced this pull request Nov 3, 2020
…trol

This reverts commit 78d3a4a and bumps
the versionadded to 2.4.0, since mixxxdj/mixxx#3076
has now been merged.
Holzhaus added a commit to Holzhaus/manual that referenced this pull request Nov 3, 2020
This reverts commit 78d3a4a and bumps
the versionadded to 2.4.0, since mixxxdj/mixxx#3076
has now been merged.
Holzhaus added a commit to Holzhaus/manual that referenced this pull request Nov 3, 2020
This reverts commit 78d3a4a and bumps
the versionadded to 2.4.0, since mixxxdj/mixxx#3076
has now been merged.
@Holzhaus
Copy link
Member

Holzhaus commented Nov 3, 2020

Have a look at: mixxxdj/manual#277

daschuer added a commit to daschuer/mixxx that referenced this pull request Aug 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants