Was Jr foolish for taking the meeting himself? Yes, but he broke no laws, even if he flew to Moscow and had a meeting with Putin himself about Hillary he still would not have broken any laws.
Federal election law makes it a felony to accept or solicit a campaign donation from a foreign national or a foreign government. For this purpose, a donation usually consists of funneled cash, but is broadly defined as "anything of value".
That Trump, Jr. came away empty handed doesn't change the reality that soliciting a foreign campaign donation is illegal even if the donation doesn't actually take place. Again, the issue may come down to whether the Clinton dirt Trump, Jr. was advised that the "Russian government" might be able to provide was an expectation of getting something valuable. His reaction to the offer - labeled as coming from the Russian government as a token of its "support" for Trump's campaign - was "I love it!"
Is opposition research something of value? Does the answer change if the supplier of that information paid money to obtain it? According to the FEC and this morning's WSJ, the definition "can encompass goods or services, like air travel or food, provided free or at below-market rates. Information can be a gift too, like polling data or donor lists."