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

LTO config and workarounds touchup and two new workarounds #452

Closed
wants to merge 34 commits into from

Conversation

elsandosgrande
Copy link
Contributor

  1. Regarding the description of c9bb8e4, I was very sleepy when I wrote that, so my logic was flawed (I realize that using ${LTO} would not prevent a setup using -fwhole-program from working) and, ironically, that was one of the only workarounds not embedding a string within a string.
  2. I know that this is a lot of changes at once, but by the time I realized that it is too much, there was no going back, as stashing commits is not a thing (or at least didn't work for me if it is a thing).

Since I have to eat right now and have to do something else later, this
commit is just so as to get my foot out the door, so to speak. Of
course, the transaltions shall be fleshed out in the coming days.
This is the first one. Here goes nothing!
I receieved permission to switch to Serbo-Croatian, Latin and Cyrillic
variants, as to better reflect my own way of speaking (the other reason
is a bit too political for GitHub, or, at the very least, this Gentoo
overlay repository, but just look up Serbo-Croatian on Wikipedia if you
are that curious; they're all fully mutually inteligible).
Markdown has been adjusted in accordance with markdownlints's best
practices, double spaces after most sentences have been removed and
sentences that were split across multiple lines have been brought
together again, even though GitHub's markdown interpreter had been
correcting for those text formatting issues
Some wording has been changed, some more merely reordered and then some
other formatting adjustments and inclusions.
"This documentation..." is not really a header.
Please do comment with suggestions as to how to improve the code, as I
have literally just looked at the code and winged it. I did a bit of
Java a few years ago, so I guess that helped a bit with intuition, but
not much else.
Also, I added Visual Studio Code files to .gitignore
Now that everything has been restructured, further progress is soon to
come!
@InBetweenNames As the latter half was somewhat confusing to me, which I
already mentioned in the Gitter chat, I took some "liberties" in
interpreting and cleaning the file in questions. Of course, these
"liberties" extend to the incoming translations, so I am hereby hoping
that nothing is amiss from your point of view.
While this basically makes `-fwhole-program` unusable by default, it's
not a bad default to have. As there is a mixture of strings and direct
flags being used in ltoworkarounds.conf (one line might have `*FLAGS-=-flto*`,
while another might have `*FLAGS-="${FLTO}"`), this can kind of be
remedied by using only direct flags. That way, if somebody were to wish
to use `-fwhole-program`, they would still be able to benifit from
ltoworkarounds.conf, since the file would now definitely work with all
setups, including those that might set some flags manually in make.conf, that is without using the strings from make.conf.lto.defines. Also, ${FLTO} was the only odd name out, so now it's ${LTO}.
So... Regarding my previous commit message, LTO is the one flag that is
never mentioned as a string. I got confused, but I was still correct
about mixed usage.
@wolfwood
Copy link
Contributor

wolfwood commented Dec 8, 2019

@elsandosgrande you can make feature branches based on origin/master and then git cherry-pick commits into the feature branches and make individual Pull Requests from each branch.

@elsandosgrande
Copy link
Contributor Author

@wolfwood Tried before, but never got it to work properly. Also, do you know how to get rid of commits which were already accepted in previous pull requests (anything before c9bb8e4)? I have never had this issue in the Olive repository.

@wolfwood
Copy link
Contributor

wolfwood commented Dec 9, 2019

merge master into this branch. or to really clean up, rebase this branch onto master, which will let you squash commits, etc. but since it edits history you'll need to force push.

@elsandosgrande
Copy link
Contributor Author

elsandosgrande commented Dec 9, 2019

@wolfwood
This is master though (my master, but still...). I tried to rebase, but I just got a lot of conflicts, mostly due to deleted files. I have tried git rebase upstream/master --rebase-merges, but git status reports nothing.

sandy@sandys-pavilion:/opt/gentooLTO$ git rebase upstream/master --rebase-merges
Successfully rebased and updated refs/heads/master.
sandy@sandys-pavilion:/opt/gentooLTO$ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
sandy@sandys-pavilion:/opt/gentooLTO$ git push
QSocketNotifier: Can only be used with threads started with QThread
QFileSystemWatcher::removePaths: list is empty
QFileSystemWatcher::removePaths: list is empty
QSocketNotifier: Can only be used with threads started with QThread
QFileSystemWatcher::removePaths: list is empty
QFileSystemWatcher::removePaths: list is empty
Everything up-to-date
sandy@sandys-pavilion:/opt/gentooLTO$ git push --force
QSocketNotifier: Can only be used with threads started with QThread
QFileSystemWatcher::removePaths: list is empty
QFileSystemWatcher::removePaths: list is empty
QSocketNotifier: Can only be used with threads started with QThread
QFileSystemWatcher::removePaths: list is empty
QFileSystemWatcher::removePaths: list is empty
Everything up-to-date

Edit

Just to clarify, it's not like there are just one or two conflicts, but there are conflicts with roughly 80% of the commits.

Edit

I realize now that I should have used a separate branch (that's why I couldn't get cherry picking to work...). Oh well, you live and you learn.

Prays that Shane does not smite him

@InBetweenNames
Copy link
Owner

I largely agree with these changes -- there's no real need to have environment variables for single flag workarounds like -fno-common. The only thing is renaming FLTO to LTO could break some peoples setups... but that's fixable with a news bulletin.

@elsandosgrande
Copy link
Contributor Author

I was actually thinking of mentioning the possibility of a news item.

Hm... @InBetweenNames, I have an idea. Give me a minute.

To think that **this** project would ever have the word "legacy" used anywhere...
@elsandosgrande
Copy link
Contributor Author

elsandosgrande commented Jan 9, 2020

There, that should cover it.

Edit

Also, @InBetweenNames, do you have an idea as to how to prevent commits that were already merged previously from appearing in future pull requests? You may refer to the conversation between me and wolfwood above to see what I have already (what did not work when I tried that).

@elsandosgrande
Copy link
Contributor Author

elsandosgrande commented Jan 10, 2020

elsandosgrande authored and InBetweenNames committed on Jul 4, 2019

Hm... In Olive, it lists my commits separately. Then again, Matthew set a "company" up on GitHub for Olive, while this is merely a personal repository. @wolfwood, regarding our earlier conversation, do you know if it is possible to replicate the behavior in another person's repository? I am not sure how to even formulate a search term for this...

Edit

By "separately", I meant that it says "elsandosgrande commited" after a pull request is merged.

@wolfwood
Copy link
Contributor

@elsandosgrande

brute force approach:

git checkout -b stuff-sandy-likes master
git branch -D master
git checkout -b master origin/master
git checkout -b new-pull master
git cherry-pick commit ids you want from stuff-sandy-likes
git push new-pull origin/new-pull

@elsandosgrande
Copy link
Contributor Author

elsandosgrande commented Jan 11, 2020

All right, I will try making a new pull with that (I will keep this one opened just in case that the new one ends up being the exact same as this one). Shane, have mercy on me!

That still leaves me wondering "Why do commits from merged requests from people to this repository not appear as committed by them in the commit log, but merely as authored by them when they do not appear as such in Olive's repository?".

Edit

Well... @wolfwood, after copying and pasting your exact commands and finding the appropriate commit hashes, it seems that new-pull has all of my commits, without exception, and I am also greeted by this:

sandy@sandys-pavilion:/opt/gentooLTO$ git cherry-pick 3b82b9729eca27b6b17d73746c0aa6c4c5d261ec 54b9bbbe291e2c8e7c43d89c7c692897898a004e 7e2ad56e9afe75f31ea480ebcfce336db19facfc 477fbed042a96b98147a5675798fbdbb794f9627 66d7515da33663ab7f3e8f7e484fe1d78fab73a2 c9bb8e4648454aa4f340183c6713800759c18b2d
On branch new-pull
Cherry-pick currently in progress.

nothing to commit, working tree clean
The previous cherry-pick is now empty, possibly due to conflict resolution.
If you wish to commit it anyway, use:

    git commit --allow-empty

and then use:

    git cherry-pick --continue

to resume cherry-picking the remaining commits.
If you wish to skip this commit, use:

    git cherry-pick --skip

sandy@sandys-pavilion:/opt/gentooLTO$ git log
commit 3b82b9729eca27b6b17d73746c0aa6c4c5d261ec (HEAD -> new-pull, origin/master, origin/HEAD, stuff-sandy-likes, master)
Author: elsandosgrande <sandyvujakovicj@outlook.com>
Date:   Thu Jan 9 11:23:28 2020 +0100

    Legacy variable support
    To think that **this** project would ever have the word "legacy" used anywhere...

commit 54b9bbbe291e2c8e7c43d89c7c692897898a004e
Author: elsandosgrande <sandyvujakovicj@outlook.com>
Date:   Tue Dec 10 15:38:58 2019 +0100

    Adding comments to relevant lines

***

...

... ... 😅

I will try this again when I translate the README, but this time before those commits are pushed to GitHub (of course, I will make a copy of my directory just in case).

@wolfwood
Copy link
Contributor

wolfwood commented Jan 11, 2020

ah, the problem is that you already pushed you local master to origin/master, which is your GitHub fork, not this repository.

git remote add this repository's url with a different name than origin, i call mine upstream.

remake your local master branch from upstream/master instead. (if you set it tracking, git pulls will automatically come from upstream rather than origin) then you should be good to make new-pull2 and cherry pick

or should be able to just rebase stuff-sandy-likes (or perhaps stuff-sandy-likes-copy) onto upstream/master

EDIT:
also looks like you have an incomplete cherry pick in progress, you should probably take the advice of the prompt to run git cherry-pick --skip to get back to normal

@elsandosgrande
Copy link
Contributor Author

  1. It is incomplete because there are no changes, that is the commit is "empty", at least as far as I can tell.
  2. So... I just replace origin with upstream in the third command? All right (I already just deleted everything in the folder and cloned my fork).
  3. Um... What about my other question (right above "Edit")?

@elsandosgrande
Copy link
Contributor Author

So... @wolfwood, new-pull is only showing six commits in the difference now! I have already made it the new default branch and will proceed to delete master (rebasing just gives me errors, like before, new-pull already has the six new commits and I don't have the time to try to fight with git rebase for the exact commit history seeing as I failed last time) and subsequently rename new-pull to master, at which point I will make a new pull request.

@InBetweenNames, I have finally succeeded with the help of wolfwood!

@wolfwood
Copy link
Contributor

@elsandosgrande you don't need to make a pull request from master. you can just push new-pull and make a PR from that, or any other branch.

regarding your other question, your author status maybe be because you have write access to Olive but not here, but i don't really know.

@elsandosgrande
Copy link
Contributor Author

@wolfwood

  1. I wanted to make new-pull into master, but rebasing did not work, so I had to make new-pull default, then delete master and then finally rename new-pull to master. My guess is that this pull request would not like that. And yes, I know that I can make a pull request from any branch, but new-pull already has all of the commits and is already clean, so...
  2. I do not, I merely made pull requests like here, the only difference being that olive-editor is an "organization", with olive being one of its repositories, while InBetweenNames is a user, with gentooLTO being one of his repositories (tl;dr organizational versus personal).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants